![JAR search and dependency download from the Maven repository](/logo.png)
org.codehaus.jackson.map.package.html Maven / Gradle / Ivy
This package contains basic mapper (conversion) functionality that
allows for converting between regular streaming json content and
various tree/object-based alternatives.
Currently 2 main flavors are supported: "Java type" and "JSON type"
mappers.
Java type mapper will use basic wrapper types (Integer,
Boolean, Double), Collection types (List, Map), Strings and nulls
to represent JSON concepts.
Json type mapper uses dynamically typed tree of JsonNodes,
bit similar to how DOM model works with xml. Main benefits over
Java type mapping are:
- No null checks are needed (dummy
nodes are created as necessary to represent "missing" Object fields
and Array elements
- No type casts are needed: all public methods are defined in
basic JsonNode class, and when "incompatible" method (such as Array
element access on, say, Boolean node) is used, returned node is
virtual "missing" node.
Because of its dynamic nature, this mapping is often convenient
for basic path access and tree navigation, where structure of
the resulting tree is known in advance.