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

Attach 'omitempty' json tag for optional fields in Go

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.3
    • Component/s: Go - Compiler
    • Labels:
      None
    • Patch Info:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: