menu
arrow_back
Type Handling Annotations in Jackson - javatpoint
Type Handling Annotations in Jackson with Jackson Tutorial, Setup Environment, First Application Jackson, ObjectMapper Class, Object Serialization using Jackson, Data Binding, Tree Model etc.

Type Handling Annotations in Jackson - javatpoint

Type Handling annotations are used for handling types of properties. Jackson provides more than one Type Handling annotations such as JsonTypeInfo, JsonSubTypes, and JsonTypeName. Type Handling annotation can be used at the time of serializing an object or deserializing a Json string.

Let's understand each one of them one by one with an example to understand how these annotations are used for type handling.

It is one of the most used Type Handling annotations which we used at the time of serializing an object. It is used for indicating the details of what type of information to include in serialization and deserialization.

Let's take an example to understand how the annotation is used for getting the detail of information.

JsonTypeInfoExample.java

Output:

It is another most used THandling annotation, which we also used at the time of serializing and deserializing an object. It is used for indicating subtypes of types annotated. The @JsonSubTypes annotation is used with @JsonTypeInfo annotation.

Let's take an example to understand the use of annotation.

JsonSubTypesExample.java

Output:

It is another important Type Handling annotation, i.e., used for setting types name to be used for annotated class.

Let's take an example to understand how the annotation works in Java:

JsonTypeNameExample.java

Output:

Splunk

SPSS

Swagger

Transact-SQL

Tumblr

ReactJS

Regex

Reinforcement Learning

R Programming

RxJS

React Native

Python Design Patterns

Python Pillow

Python Turtle

Keras

Aptitude

Reasoning

Verbal Ability

Interview Questions

Company Questions

Artificial Intelligence

AWS

Selenium

Cloud Computing

Hadoop

ReactJS

Data Science

Angular 7

Blockchain

Git

Machine Learning

DevOps

DBMS

Data Structures

DAA

Operating System

Computer Network

Compiler Design

Computer Organization

Discrete Mathematics

Ethical Hacking

Computer Graphics

Software Engineering

Web Technology

Cyber Security

Automata

C Programming

C++

Java

.Net

Python

Programs

Control System

Data Mining

Data Warehouse

JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.

JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week

Website Development

Android Development

Website Designing

Digital Marketing

Summer Training

Industrial Training

College Campus Training

Address: G-13, 2nd Floor, Sec-3

Noida, UP, 201301, India

Contact No: 0120-4256464, 9990449935

© Copyright 2011-2021 www.javatpoint.com. All rights reserved. Developed by JavaTpoint.

keyboard_arrow_up