It does matter, and omitempty must have a leading comma; the first comma separated term is the JSON field name. From the json docs:
``` The format string gives the name of the field, possibly followed by a comma-separated list of options. The name may be empty in order to specify options without overriding the default field name. ``` On Tue, 2018-01-30 at 14:06 +0300, Konstantin Khomoutov wrote: > > Does the order in which the options in the tag appear matter (e.g. > > `json:"first_name,omitempty"` vs `json:"omitempty,first_name"`) ? > > I'd say they should not as their purposes are orthogonal to each > other. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.