Jackson Annotations

@JsonInclude Jackson Annotation

@JsonInclude annotation is used to exclude properties during object serialization. By default, all properties of a class are included during serialization. But by using the @JsonInclude annotation, we can exclude a few properties during serialization. This annotation can be applied at the field, method, or class levels. @JsonInclude annotation provides us with different options. A

@JsonInclude Jackson Annotation Read More »

@JsonAnySetter Jackson Annotation

@JsonAnySetter annotation allows the non-static setter method to deserialize unmapped/unrecognized JSON properties. It’s not mandatory to populate unrecognized properties in a map using the setter method, but for simplicity, we are populating them in a map. We can also use @JsonAnyGetter annotation at the getter method of the same map to serialize these unrecognized properties

@JsonAnySetter Jackson Annotation Read More »