FasterXML/jackson-databind

Developer Tools

Java library that maps JSON and other data formats to POJOs, or keeps documents as tree or streaming nodes.

3,755
1,541
Java
Apache-2.0
14 years old

Jackson-databind is the general-purpose data-binding and tree-model layer of Jackson for Java. It sits on the streaming parser/generator and annotation packages, mapping data into ordinary Java classes or a mutable JsonNode tree. It is the natural fit for JVM services that must read or write JSON-shaped data with typed models. It does not bind only JSON: any format with a parser/generator implementation can be used, although many class names still say JSON README.

Three ways to process data

The default unit is ObjectMapper, created once and reused. From it, the same API reads a POJO from a file, URL or string and writes it back as a file, bytes or string. A second path, the Tree Model, is more convenient for highly dynamic documents or when part of a payload does not map to Java classes; you can read a JsonNode, traverse or modify it, then convert a sub-node into a typed object. The third path exposes the streaming parser and generator directly, which is useful when you need fine control over reading and writing rather than whole-object binding README.

The same object also supports POJO-to-POJO conversion through convertValue, skipping the intermediate JSON text; the author describes this as a faster route and gives examples such as list-to-array, POJO-to-Map and Base64 decoding README.

Configuration and error handling

Binding behavior is controlled through builder-configured features: for example indentation, whether empty beans fail, unknown properties, timestamp date output, and non-standard JSON inputs such as comments or single-quoted strings features documentation. Annotations from the companion annotations package change property names (@JsonProperty), ignore fields, and select constructors or factory methods with @JsonCreator; classes can be deserialized through a separate Builder pattern with @JsonPOJOBuilder README.

In 3.1+, a problem-collecting reader can gather multiple type-conversion and unknown-property errors into one DeferredBindingException rather than stopping at the first. This is best-effort: malformed document structure still fails immediately, fields that failed carry default values, and the partial result is not returned when problems exist. The default cap is 100 collected problems, configurable per reader, and the author presents the cap as protection against huge bad payloads README.

Requirements and scope

Version 2.x requires JDK 8; version 3.x requires JDK 17. Android compatibility is documented for 2.14–2.19 at SDK 26+ and for 3.0 at SDK 34+. Maven or Gradle pulls in jackson-core and jackson-annotations automatically; without a dependency-resolving build tool those two jars must be added explicitly. The jar is also an OSGi bundle and, from 2.10, includes JPMS module definitions README.

Jackson-databind is a core component, and core components may depend only on supported JDK methods and the other two core packages; features that need other libraries belong in separately built Jackson modules README. The project is Apache-2.0 licensed Apache License 2.0, and development is split across an active 3.x line and maintained 2.x branches, so the major version determines both package name and runtime baseline README. The repository also hosts the 3.x source; a 2023 dispute over a scanner-flagged CVE was discussed on Hacker News, with a commenter stating that the authors agreed the CVE should be revoked while databases lagged HN discussion.

Written by AI from the project's README, updated October 30, 2026. The project's own docs are the source of truth.

Hacker News

Disputed Jackson-databind CVE Causing Disruption
▲ 4 · 2 comments · June 28, 2023
Jackson-bind Block yet another gadget type (CVE-2019-12814)
▲ 1 · 1 comment · July 21, 2019