The current package provides the following json tag capabilities as specified in the docs:
// Field is ignored by this package.
Field int `json:"-"`
// Field appears in JSON as key "myName".
Field int `json:"myName"`
// Field appears in JSON as key "myName" and
// the field is omitted from the object if its value is empty,
// as defined above.
Field int `json:"myName,omitempty"`
// Field appears in JSON as key "Field" (the default), but
// the field is skipped if empty.
// Note the leading comma.
Field int `json:",omitempty"`
A feature I propose is an additional set of tag parameters that allow for definition of the directional conditions to marshal/unmarshal.
// Field appears in JSON as key "myName" and
// the field is omitted from the object when unmarshalled
Field int `json:"myName,marshalonly"`
// Field appears in JSON as key "myName" and
// the field is omitted from the object when marshalled
Field int `json:"myName,unmarshalonly"`
The current package provides the following json tag capabilities as specified in the docs:
A feature I propose is an additional set of tag parameters that allow for definition of the directional conditions to marshal/unmarshal.