Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3006

Attach 'omitempty' json tag for optional fields in Go

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.3
    • Go - Compiler
    • None
    • Patch Available

    Description

      This pull request improves on THRIFT-2549 in that it additionally tags optional fields with the omitempty tag so that dumping a struct to json doesn't result in a bunch of null fields. I think this is the right thing to do with optional fields, and additionally it matches the protoc behavior in go.

      Attachments

        Activity

          People

            jensg Jens Geyer
            pjjw peter woodman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: