@JsonInclude(Include.NON_NULL) not working as expected
I tried
@JsonSerialize(include = Inclusion.NON_NULL)
intead of
@JsonInclude(Include.NON_NULL)
and it worked as expected.
This has been deprecated:
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
Use instead:
@JsonInclude(Include.NON_NULL)