Jackson
The most widely used Java library for converting between Java objects and JSON, and the default in Spring Boot.
In more detail
Jackson reads records through their components and writes them using the component names as JSON field names. Its ObjectMapper holds the rules for naming, dates and unknown fields. Extra modules add support for types such as java.time dates.
Examples
com.fasterxml.jackson.core:jackson-databind:2.22.2com.fasterxml.jackson.datatype:jackson-datatype-jsr310Related terms
- ObjectMapper — Jackson's main class, which converts objects to JSON with writeValueAsString and JSON to typed objects with readValue, following its configured rules.
- serialization — Turning an in-memory object into bytes, such as JSON text, that can be sent or stored, and parsing it back again.
- JSON — A simple text format for structured data made of keys, values, lists and nested objects.
- record (Java) — A compact Java class for plain data, declared with its components in one line, for which the compiler generates the fields, accessors, equals, hashCode and toString.
Taught in
- The Toolchain: Maven — Modern Java: Virtual Threads & High-Throughput Services
- Pattern Matching And Text Blocks — Modern Java: Virtual Threads & High-Throughput Services
- Serialization And JSON — Modern Java: Virtual Threads & High-Throughput Services
- Working With Jackson — Modern Java: Virtual Threads & High-Throughput Services