Codekru

Ambiguity for the null parameter in method overloading

Method overloading is an oops concept where two methods have the same name but different parameters. In method overloading, we can have parameters that can match multiple overloaded methods. In this case, the compiler will select the most specific method and call it. But if there are two specific methods and the compiler cannot decide […]

Ambiguity for the null parameter in method overloading Read More »

@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 »