Datatype module to make Jackson
recognize JsonValue
types of JSON API defined in JSR-353 (JSON-P, "JSON-Processing"), so that
you can read JSON as JsonValue
s and write JsonValue
s as JSON as part of normal
Jackson processing.
Note that there is also a related jackson-javax-json module which actually implements JSR-353 using Jackson streaming API under the hood.
In both cases the main reason for use is interoperability, as well as to take advantage of powerful data-binding features Jackson provides. Another benefit is the performance: Jackson implementation is often significantly faster for reading and writing JSON content than Oracle's JSR-353 Reference Implementation.
Starting with version 2.11 supports JSON-P 1.1 (that is, JSR-374 as well.
To use module on Maven-based projects, use following dependency:
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr353</artifactId>
<version>2.11.0</version>
</dependency>
(or whatever version is most up-to-date at the moment)
Also unless you already include a dependency to a JSR-353 implementation (JDK does not ship with one at least with JDK 8 and prior), you may need to include one. Implementations include:
Reference implementation dependency would be: