Home » Disable Annotation in Jackson

Disable Annotation in Jackson

by Online Tutorials Library

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:

Disable Annotation


You may also like