Tags: cloudfoundry/jsonry
Tags
fix(omitempty): must omit empty slices The `omitempty` tag was omitting `nil` slices but not slices that were allocated but had length zero. This has been fixes for consistency with json.Marshal. Also empty structs are no longer omitted for consistency with json.Marhsal.
Unmarshal `null` should be have like json.Unmarshal There's a subtle behavior in json.Unmarshal that needs to be captured. When unmashaling `null` it: - basic type - leaves existing value - pointer - overwrites with nil - interface{} - overwrites with nil Current behavour is incorrect because it returns an error, and the aim should be to behave in the same way as json.Unmarshal