I've a POJO with Jackson annotations
public class Sample{
private String property1;
@JsonIgnore
private String property2;
//...setters getters
}
So, when Jackson library is used for automarshalling by other frameworks such as RestEasy these annotations help guide the serialization and deserilization process.
But when I want to explicitly serialize using ObjectMapper mapper = new ObjectMapper(), I don't want those annotations to make any effect, instead I will configure the mapper object to my requirement.
So, how to make the annotations not make any effect while using ObjectMapper?
The method configure(MapperFeature, boolean) in the type ObjectMapper is not applicable for the arguments (DeserializationConfig.Feature, boolean)
. Any suggestions? – Lamphere