json
Drop-in replacement for Golang encoding/json with additional features.
Installation
$ go get -u github.com/clarketm/json
Usage
Same usage as Golang encoding/json
.
Features
- Support zero values of structs with
omitempty
: golang/go#11939.
If
omitempty
is applied to a struct and all the children of the struct are empty, then on marshalling it will be omitted from the encoded json.