Closed
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version
)?
1.7.4
What operating system and processor architecture are you using (go env
)?
darwin/amd64
What did you do?
https://play.golang.org/p/vhIPYQjX8_
What did you expect to see?
type A struct { B *int `json:"b, omitempty"` }
should serialize to {}
What did you see instead?
type A struct { B *int `json:"b, omitempty"` }
serializes to {"b":null}
Happy to submit a patch to address this, just wanted to know if there wasn't a specific unstated reason why this is the way it is.