Feature request: Force inclusion of specific field when null
Open
enhancement
- Dominant language
- Java
- Stars
- 24.2k
- Forks
- 4.5k
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 12
Description
```
Gson allows blanket-inclusion of null fields, using serializeNulls(). But this
produces much bigger JSON output (which is why the default is not to serialize
nulls).
It would be nice to support a per-field annotation, for just those fields where
(broken) clients expect a null to be provided. The alternative is to turn on
serializeNulls everywhere (I think).
Jackson supports this with @JsonInclude(Include.ALWAYS).
```
Original issue reported on code.google.com by `jus...@fathomdb.com` on 26 Aug 2013 at 12:58
Contributor guide
Assessment
This issue has not been assessed yet.