On Sun, Jan 28, 2018 at 09:21:12AM -0800, Trig wrote:

> I've searched but can't find any good sources on json struct tag options 
> and rules...

These rules are contained in the pieces of documentation for
encoding/json.Marshal and encoding/json.Unmarshal; studying the output
of `go doc json.Marshal` and `go doc json.Unmarshal` should have you
covered.

> 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.

Reply via email to