Descriptionencoding/json: make omitempty honor IsZero() methods
Packages such as time have IsZero() methods, to detect an empty
time. By default, encoding/json will still encode the zero value
into the bytes.
This change has a proposed fix, with tests, for JSON only. If the
approach is deemed suitable, then similar fixes will be needed for
the other marshalling formats.
Affects issue 4357.
Patch Set 1 #Patch Set 2 : diff -r e47e60d39fc2 https://go.googlecode.com/hg/ #
|