You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to serialize an instance of a class containing an optional field, and this field is coming through as null even when JsonInclude.Include.NON_NULL is specified.
Hi @stuartizon
Not sure I understood you, but lastName is not null in your examples. This is a singleton Option.None.INSTANCE object. This object satisfies the JsonInclude.Include.NON_NULL condition and not satisfies the JsonInclude.Include.NON_EMPTY condition.
Trying to serialize an instance of a class containing an optional field, and this field is coming through as
null
even when JsonInclude.Include.NON_NULL is specified.This test fails whether I put the NON_NULL setting as an annotation on the data class or if I add it manually to the objectMapper.
Not sure if this is the expected behaviour but I did see this #51 from a couple of years ago which seems to imply it should work.
Using Vavr 0.10.0, Lombok 1.18.6, Jackson 2.9.8
The text was updated successfully, but these errors were encountered: