The quickest way is probably to use annotation `@JsonInclude` on POJO
or property:
@JsonInclude(JsonInclude.Include.NON_NULL)
(see `TestViews.java` test f.ex)
It is also possible change defaults with something like:
final XmlMapper mapper = XmlMapper.builder()
.changeDefaultPropertyInclusion(incl ->
incl.withValueInclusion(Include.NON_NULL))
.build();
I hope this helps,
-+ Tatu +-
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
jackson-user...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/jackson-user/8c8d03ae-82c6-4eaa-86d8-57ab392eb498n%40googlegroups.com.