ObjectId, json-omitempty

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Minor - P4
    • None
    • Affects Version/s: 0.1.0
    • Component/s: JSON & ExtJSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      E.g

      type Obj struct {
          SomeId objectid.ObjectID `bson:"listId,omitempty" json:"someId,omitempty"`
      }

      When an object is marshalled with SomeId ==  primitive.NilObjectID and omitempty tag, it shouldn't be included in the marshalled string.

      Now it's marshalled into

      {
         "someId: "00000000000000000000000"
      }

            Assignee:
            Kristofer Brandow (Inactive)
            Reporter:
            Dávid Mikuš
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: