@JsonInclude

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Preventing Inclusion of Null Fields

...
@JsonInclude(JsonInclude.Include.NON_NULL)
private Integer someField;
...

Alos see:

Jackson ObjectMapper Configuration