Skip to main content

JSON to Java

New

Generate Java records with Jackson annotations from JSON data.

convertjavajackson
Read the guide
Shortcuts:⌘ KSearch
Jackson annotations are added only when JSON keys need renaming.

Frequently Asked Questions

Can I switch between records and classic classes?

Yes. Records are on by default, but you can disable them to generate final fields, a constructor, and getters instead.

Why is my top-level array wrapped instead of becoming List<Foo>?

For a root array, this tool generates a model with a single items field of type List<...>. It does not emit a bare List alias.

When are Jackson annotations added?

Only when the camelCased Java field name differs from the original JSON key. In that case the field or record component gets @JsonProperty.

How are arrays and nulls inferred?

Arrays use the first non-null item as the sample shape, and null falls back to Object. There is no union type generation for mixed arrays.

Are nested types inner classes?

No. The generator emits separate top-level types. The root one is public, and helper types are package-private.

Related Tools