Consider a case that I have 2 instance of Object Mapper. I want one must exclude fields that are annotated with some custom annotation from serialization While other mapper includes(ignores annotation)
Like class has 3 fields a,b,c and c is annotated with some annotation (say @IgnoreField) (Their will n number of class, each will have their Fields that are not meant to be serialized)
Now 1st object mapper o1 must serialize only a and b. While 2nd object mapper o2 can serialize a,b and c.
This can happen with any class having different fields some of which may be annotated.