95
Disable Annotation
Usually we need to disable the Jackson annotation after completing its work. So, we use the disable() method of ObjectMapper class for disabling the annotation.
We pass the USE_ANNOTATIONS mapper feature to the disable() method of the ObjectMapper class.
Let’s take an example to understand how to use the disable() method for disabling an annotation.
DisableAnnotationExample.java
Output:
Next TopicJackson Ignore Properties on Marshalling