Javatpoint Logo
Javatpoint Logo

Miscellaneous Annotations in Jackson

Custom annotation and MixIn annotation come in miscellaneous annotations. Miscellaneous annotations are used at the time of serializing and de-serializing Json.

Miscellaneous Annotations in Jackson

Let's understand each one of them one by one with an example.

Custom Annotation

@JacksonAnnotationsInside is one of the most important annotations that help developers implement custom annotation. Let's take an example to understand how to create and use custom annotation.

CustomAnnotationExample.java

Output:

Miscellaneous Annotations in Jackson

MixIn Annotation

If we want to associate annotations without modifying the target class, we use mixin annotation. Let's take an example to understand how it is used for associating annotations.

MixInAnnotationExample.java

Output:

Miscellaneous Annotations in Jackson





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA