Skip to main content
Back to tools

JSON to Java POJO

Generate Jackson-annotated Java POJOs from a JSON object

About JSON to Java POJO

JSON to Java POJO lets you generate jackson-annotated java pojos from a json object.

Category: Converters.

Frequently asked questions

What is a POJO?

A Plain Old Java Object (POJO) is a simple Java class with private fields and public getters/setters, with no dependency on a specific framework.

Which library are the annotations from?

The @JsonProperty annotations come from Jackson (com.fasterxml.jackson.core). Add jackson-databind to your pom.xml or build.gradle to use them.

How are arrays handled?

JSON arrays become List<T> fields using java.util.List. The generic type T is inferred from the first element of the array.

How do I deserialize JSON with Jackson?

ObjectMapper mapper = new ObjectMapper(); Root root = mapper.readValue(jsonString, Root.class); — the generated @JsonProperty annotations handle key mapping.

Related tools