Uses of Class
tools.jackson.databind.JsonNode
Packages that use JsonNode
Package
Description
Basic data binding (mapping) functionality that
allows for reading JSON content into Java Objects (POJOs)
and JSON Trees (
JsonNode
), as well as
writing Java Objects and trees as JSON.Contains implementation classes of deserialization part of
data binding.
Package that contains standard value and key deserializer implementations
Jackson uses for its own public types.
Package that contains standard value and key deserializer implementations
Jackson uses for core JDK types.
Package that contains standard value and key deserializer base classes
that Jackson both uses for its own implementations and offers for
module developers as convenient partial implementations.
Contains concrete
JsonNode
implementations
Jackson uses for the Tree model.Contains implementation classes of serialization part of
data binding.
Utility classes for Mapper package.
-
Uses of JsonNode in tools.jackson.databind
Methods in tools.jackson.databind with type parameters of type JsonNodeModifier and TypeMethodDescriptionprotected <T extends JsonNode>
TJsonNode._this()
<T extends JsonNode>
TJsonNode.require()
Method that may be called to verify thatthis
node is NOT so-called "missing node": that is, one for whichisMissingNode()
returnstrue
.<T extends JsonNode>
TJsonNode.requireNonNull()
Method that may be called to verify thatthis
node is neither so-called "missing node" (that is, one for whichisMissingNode()
returnstrue
) nor "null node" (one for whichisNull()
returnstrue
).<T extends JsonNode>
TObjectMapper.valueToTree
(Object fromValue) Method that is reverse ofObjectMapper.treeToValue(tools.jackson.core.TreeNode, java.lang.Class<T>)
: it will convert given Java value (usually bean) into its equivalent Tree modelJsonNode
representation.<T extends JsonNode>
TObjectWriter.valueToTree
(Object fromValue) Method that will convert given Java value (usually bean) into its equivalent Tree modelJsonNode
representation.abstract <T extends JsonNode>
TSerializationContext.valueToTree
(Object fromValue) Method that will convert given Java value (usually bean) into its equivalent Tree modeJsonNode
representation.Methods in tools.jackson.databind that return JsonNodeModifier and TypeMethodDescriptionprotected abstract JsonNode
JsonNode._at
(JsonPointer ptr) Helper method used by other methods for traversing the next step of given path expression, and returning matching value node if any: if no match,null
is returned.protected final JsonNode
ObjectReader._bindAndCloseAsTree
(DeserializationContextExt ctxt, JsonParser p0) protected final JsonNode
ObjectReader._bindAsTree
(DeserializationContextExt ctxt, JsonParser p) protected final JsonNode
ObjectReader._bindAsTreeOrNull
(DeserializationContextExt ctxt, JsonParser p) Same asObjectReader._bindAsTree(tools.jackson.databind.deser.DeserializationContextExt, tools.jackson.core.JsonParser)
except end-of-input is reported by returningnull
, not "missing node"protected JsonNode
ObjectMapper._readTreeAndClose
(DeserializationContextExt ctxt, JsonParser p0) Similar toObjectMapper._readMapAndClose(tools.jackson.databind.deser.DeserializationContextExt, tools.jackson.core.JsonParser, tools.jackson.databind.JavaType)
but specialized forJsonNode
reading.final JsonNode
Convenience method that is functionally equivalent to:final JsonNode
JsonNode.at
(JsonPointer ptr) Method for locating node specified by given JSON pointer instances.ObjectMapper.booleanNode
(boolean b) ObjectReader.booleanNode
(boolean b) abstract JsonNode
JsonNode.deepCopy()
Method that can be called to get a node that is guaranteed not to allow changing of this node through mutators on this node or any of its children.abstract JsonNode
JsonNode.findParent
(String propertyName) Method for finding a JSON Object that contains specified field, within this node or its descendants.abstract JsonNode
Method similar tofindValue(java.lang.String)
, but that will return a "missing node" instead of null if no field is found.abstract JsonNode
Method for finding the first JSON Object field with specified name in this node or its child nodes, and returning value it has.abstract JsonNode
JsonNode.get
(int index) Method for accessing value of the specified element of an array node.Method for accessing value of the specified field of an object node.ObjectMapper.missingNode()
ObjectReader.missingNode()
ObjectMapper.nullNode()
ObjectReader.nullNode()
abstract JsonNode
JsonNode.path
(int index) This method is similar toget(int)
, except that instead of returning null if no such element exists (due to index being out of range, or this node not being an array), a "missing node" (node that returns true forisMissingNode()
) will be returned.abstract JsonNode
This method is similar toget(String)
, except that instead of returning null if no such value exists (due to this node not being an object, or object not having value for the specified field), a "missing node" (node that returns true forisMissingNode()
) will be returned.DeserializationContext.readTree
(JsonParser p) ObjectMapper.readTree
(byte[] content) Same asObjectMapper.readTree(InputStream)
except content read from passed-in byte array.ObjectMapper.readTree
(byte[] content, int offset, int len) Same asObjectMapper.readTree(InputStream)
except content read from passed-in byte array.Same asObjectMapper.readTree(InputStream)
except content read from passed-inFile
.ObjectMapper.readTree
(InputStream in) Method to deserialize JSON content as tree expressed using set ofJsonNode
instances.Same asObjectMapper.readTree(InputStream)
except content accessed through passed-inReader
Same asObjectMapper.readTree(InputStream)
except content read from passed-inString
Same asObjectMapper.readTree(InputStream)
except content read from passed-inPath
.ObjectMapper.readTree
(JsonParser p) Method to deserialize JSON content as a treeJsonNode
.ObjectMapper.readTree
(TokenBuffer src) Same asObjectMapper.readTree(InputStream)
except content read from passed-inTokenBuffer
.ObjectReader.readTree
(byte[] content) Same asObjectReader.readTree(InputStream)
except content read from passed-in byte array.ObjectReader.readTree
(byte[] content, int offset, int len) Same asObjectReader.readTree(InputStream)
except content read from passed-in byte array.Same asObjectReader.readTree(InputStream)
except content read using passed-inDataInput
.ObjectReader.readTree
(InputStream src) Method that reads content from given input source, using configuration of this reader, and binds it as JSON Tree.Same asObjectReader.readTree(InputStream)
except content accessed through passed-inReader
Same asObjectReader.readTree(InputStream)
except content read from passed-inString
ObjectReader.readTree
(JsonParser p) Convenience method that binds content read using given parser, using configuration of this reader, except that content is bound as JSON tree instead of configured root value type.ObjectReader.readTree
(TokenBuffer src) Same asObjectReader.readTree(InputStream)
except content read using passed-inTokenBuffer
.abstract JsonNode
JsonNode.required
(int index) Method is functionally equivalent topath(index).required()
and can be used to check that this node is anArrayNode
(that is, represents JSON Array value) and has value for specifiedindex
(but note that value may be explicit JSON null value).abstract JsonNode
Method is functionally equivalent topath(propertyName).required()
and can be used to check that this node is anObjectNode
(that is, represents JSON Object value) and has value for specified property with keypropertyName
(but note that value may be explicit JSON null value).JsonNode.requiredAt
(String pathExpr) Method is functionally equivalent toat(pathExpr).required()
and can be used to check that there is an actual value node at specifiedJsonPointer
starting fromthis
node (but note that value may be explicit JSON null value).final JsonNode
JsonNode.requiredAt
(JsonPointer path) Method is functionally equivalent toat(path).required()
and can be used to check that there is an actual value node at specifiedJsonPointer
starting fromthis
node (but note that value may be explicit JSON null value).ObjectMapper.stringNode
(String text) ObjectReader.stringNode
(String text) Methods in tools.jackson.databind that return types with arguments of type JsonNodeModifier and TypeMethodDescriptionJsonNode.asOptional()
JsonNode.findParents
(String propertyName) Method for finding a JSON Object that contains specified field, within this node or its descendants.JsonNode.findParents
(String propertyName, List<JsonNode> foundSoFar) JsonNode.findValues
(String propertyName) Method for finding JSON Object fields with specified name -- both immediate child values and descendants -- and returning found ones as aList
.JsonNode.findValues
(String propertyName, List<JsonNode> foundSoFar) JsonNode.iterator()
Implemented so that convenience "for-each" loop can be used for looping over elements of JSON Array constructs.JsonNode.optional
(int index) Method for accessing value of the specified element of an array node, wrapped in anOptional
.Method for accessing value of the specified field of an object node.JsonNode.properties()
Accessor that will return properties ofObjectNode
similar to howMap.entrySet()
works; for other node types will return emptySet
.JsonNode.propertyStream()
Returns a stream of all properties (key, value pairs) of this Node, iff this node is an anObjectNode
.final Spliterator<JsonNode>
JsonNode.spliterator()
JsonNode.values()
Method for accessing all value nodes of this Node, iff this node is a JSON Array or Object node.JsonNode.valueStream()
Returns a stream of all value nodes of this Node, iff this node is anArrayNode
orObjectNode
.Methods in tools.jackson.databind with parameters of type JsonNodeModifier and TypeMethodDescriptionboolean
JsonNode.equals
(Comparator<JsonNode> comparator, JsonNode other) Entry method for invoking customizable comparison, using passed-inComparator
object.<T> T
DeserializationContext.readTreeAsValue
(JsonNode n, Class<T> targetType) Helper method similar toObjectReader.treeToValue(TreeNode, Class)
which will read contents of given tree (JsonNode
) and bind them into specified target type.<T> T
DeserializationContext.readTreeAsValue
(JsonNode n, JavaType targetType) Same asDeserializationContext.readTreeAsValue(JsonNode, Class)
but will fully resolvedJavaType
astargetType
<T> T
Convenience method for converting results from given JSON tree into given value type.protected JsonParser
ObjectReader.treeAsTokens
(JsonNode n, DeserializationContext ctxt) Method parameters in tools.jackson.databind with type arguments of type JsonNodeModifier and TypeMethodDescriptionboolean
JsonNode.equals
(Comparator<JsonNode> comparator, JsonNode other) Entry method for invoking customizable comparison, using passed-inComparator
object.JsonNode.findParents
(String propertyName, List<JsonNode> foundSoFar) JsonNode.findValues
(String propertyName, List<JsonNode> foundSoFar) void
JsonNode.forEachEntry
(BiConsumer<? super String, ? super JsonNode> action) If this node is anObjectNode
, performs the given action for each property (key, value pair) until all entries have been processed or the action throws an exception. -
Uses of JsonNode in tools.jackson.databind.deser
Methods in tools.jackson.databind.deser with parameters of type JsonNodeModifier and TypeMethodDescriptionprotected void
SettableAnyProperty.JsonNodeFieldAnyProperty.setProperty
(Object instance, String propName, JsonNode value) -
Uses of JsonNode in tools.jackson.databind.deser.jackson
Classes in tools.jackson.databind.deser.jackson with type parameters of type JsonNodeModifier and TypeClassDescriptionclass
BaseNodeDeserializer<T extends JsonNode>
Base class for all actualJsonNode
deserializer implementations.Methods in tools.jackson.databind.deser.jackson that return JsonNodeModifier and TypeMethodDescriptionprotected final JsonNode
BaseNodeDeserializer._deserializeAnyScalar
(JsonParser p, DeserializationContext ctxt) protected final JsonNode
BaseNodeDeserializer._deserializeRareScalar
(JsonParser p, DeserializationContext ctxt) protected final JsonNode
BaseNodeDeserializer._fromEmbedded
(JsonParser p, DeserializationContext ctxt) protected final JsonNode
BaseNodeDeserializer._fromFloat
(JsonParser p, DeserializationContext ctxt, JsonNodeFactory nodeFactory) protected final JsonNode
BaseNodeDeserializer._fromInt
(JsonParser p, int coercionFeatures, JsonNodeFactory nodeFactory) protected final JsonNode
BaseNodeDeserializer._fromInt
(JsonParser p, DeserializationContext ctxt, JsonNodeFactory nodeFactory) JsonNodeDeserializer.deserialize
(JsonParser p, DeserializationContext ctxt) Implementation that will produce types of any JSON nodes; not just one deserializer is registered to handle (in case of more specialized handler).JsonNodeDeserializer.getNullValue
(DeserializationContext ctxt) protected final JsonNode
BaseNodeDeserializer.updateObject
(JsonParser p, DeserializationContext ctxt, ObjectNode node, tools.jackson.databind.deser.jackson.BaseNodeDeserializer.ContainerStack stack) Alternate deserialization method that is to update existingObjectNode
if possible.Methods in tools.jackson.databind.deser.jackson with parameters of type JsonNodeModifier and TypeMethodDescriptionprotected void
BaseNodeDeserializer._handleDuplicateProperty
(JsonParser p, DeserializationContext ctxt, JsonNodeFactory nodeFactory, String propName, ObjectNode objectNode, JsonNode oldValue, JsonNode newValue) Method called when there is a duplicate value for an Object property. -
Uses of JsonNode in tools.jackson.databind.deser.jdk
Methods in tools.jackson.databind.deser.jdk with parameters of type JsonNodeModifier and TypeMethodDescriptionThreadGroupDeserializer.convert
(JsonNode root, DeserializationContext ctxt) -
Uses of JsonNode in tools.jackson.databind.deser.std
Methods in tools.jackson.databind.deser.std with parameters of type JsonNodeModifier and TypeMethodDescriptionabstract T
StdNodeBasedDeserializer.convert
(JsonNode root, DeserializationContext ctxt) StdNodeBasedDeserializer.convert
(JsonNode root, DeserializationContext ctxt, T newValue) Facilitates usage withObjectMapper.readerForUpdating(Object)
andStdNodeBasedDeserializer.deserialize(JsonParser, DeserializationContext, Object)
by eliminating the need to manually convert the value to aJsonNode
. -
Uses of JsonNode in tools.jackson.databind.exc
Fields in tools.jackson.databind.exc declared as JsonNodeMethods in tools.jackson.databind.exc that return JsonNodeMethods in tools.jackson.databind.exc with parameters of type JsonNodeConstructors in tools.jackson.databind.exc with parameters of type JsonNode -
Uses of JsonNode in tools.jackson.databind.node
Subclasses of JsonNode in tools.jackson.databind.nodeModifier and TypeClassDescriptionclass
Node class that represents Arrays mapped from JSON content.class
Abstract base class common to all standardJsonNode
implementations.class
Numeric node that contains simple 64-bit integer values.class
Value node that contains Base64 encoded binary value, which will be output and stored as Json String value.class
This concrete value class is used to contain boolean (true / false) values.class
ContainerNode<T extends ContainerNode<T>>
This intermediate base class is used for all container nodes, specifically, array and object nodes.class
Numeric node that contains values that do not fit in simple floating point (double) values.class
Numeric node that contains 64-bit ("double precision") floating point values simple 32-bit integer values.class
JsonNode
implementation for efficiently containing 32-bit `float` values.class
Numeric node that contains simple 32-bit integer values.class
Numeric node that contains simple 64-bit integer values.final class
This singleton node class is generated to denote "missing nodes" along paths that do not exist.class
This singleton value class is used to contain explicit JSON null value.class
Intermediate node class used for numeric nodes that contain floating-point values: provides partial implementation of common methods.class
Intermediate node class used for numeric nodes that contain integral values: provides partial implementation of common methods.class
Intermediate value node used for numeric nodes.class
Node that maps to JSON Object structures in JSON content.class
Value node that contains a wrapped POJO, to be serialized as a JSON constructed through data mapping (usually done by callingObjectMapper
).class
Numeric node that contains simple 16-bit integer values.class
Value node that contains a String value.class
This intermediate base class is used for all leaf nodes, that is, all non-container (array or object) nodes, except for the "missing node".Fields in tools.jackson.databind.node declared as JsonNodeModifier and TypeFieldDescriptionprotected final JsonNode
TreeTraversingParser._source
protected static final JsonNode
ValueNode.MISSING
Fields in tools.jackson.databind.node with type parameters of type JsonNodeMethods in tools.jackson.databind.node that return JsonNodeModifier and TypeMethodDescriptionprotected JsonNode
ArrayNode._at
(JsonPointer ptr) protected JsonNode
MissingNode._at
(JsonPointer ptr) protected JsonNode
ObjectNode._at
(JsonPointer ptr) protected JsonNode
ValueNode._at
(JsonPointer ptr) protected JsonNode
TreeTraversingParser.currentNode()
protected JsonNode
TreeTraversingParser.currentNumericNode
(int targetNumType) MissingNode.findParent
(String fieldName) final JsonNode
final JsonNode
ArrayNode.get
(int index) abstract JsonNode
ContainerNode.get
(int index) abstract JsonNode
MissingNode.get
(int index) ObjectNode.get
(int index) final JsonNode
ValueNode.get
(int index) final JsonNode
ContainerNode.missingNode()
JsonNodeCreator.missingNode()
JsonNodeFactory.missingNode()
ArrayNode.path
(int index) MissingNode.path
(int index) ObjectNode.path
(int index) final JsonNode
ValueNode.path
(int index) final JsonNode
ObjectNode.putIfAbsent
(String propertyName, JsonNode value) Method that will set value of specified property if (and only if) it had no set value previously.ArrayNode.remove
(int index) Method for removing an entry from this ArrayNode.Method for removing a property from thisObjectNode
.Method that will set specified element, replacing old value.Method for replacing value of specific property with passed value, and returning previous value (or null if none).MissingNode.require()
ArrayNode.required
(int index) BaseJsonNode.required
(int index) MissingNode.requireNonNull()
NullNode.requireNonNull()
TreeTraversingParser.streamReadInputSource()
TreeBuildingGenerator.treeBuilt()
Methods in tools.jackson.databind.node that return types with arguments of type JsonNodeModifier and TypeMethodDescriptionObjectNode._contentsToSerialize
(SerializationContext ctxt) Helper method for encapsulating details of accessing child node entries to serialize.MissingNode.asOptional()
ArrayNode.elements()
Alias ofArrayNode.values()
.ArrayNode.findParents
(String propertyName, List<JsonNode> foundSoFar) MissingNode.findParents
(String fieldName, List<JsonNode> foundSoFar) ObjectNode.findParents
(String propertyName, List<JsonNode> foundSoFar) ValueNode.findParents
(String fieldName, List<JsonNode> foundSoFar) ArrayNode.findValues
(String propertyName, List<JsonNode> foundSoFar) MissingNode.findValues
(String fieldName, List<JsonNode> foundSoFar) ObjectNode.findValues
(String propertyName, List<JsonNode> foundSoFar) ValueNode.findValues
(String fieldName, List<JsonNode> foundSoFar) ArrayNode.optional
(int index) ObjectNode.properties()
Method to use for accessing all properties (with both names and values) of this JSON Object.ObjectNode.propertyStream()
ArrayNode.values()
Method for accessing all value nodes of this Node, iff this node is a JSON Array or Object node.ObjectNode.values()
ArrayNode.valueStream()
ContainerNode.valueStream()
ObjectNode.valueStream()
Methods in tools.jackson.databind.node with parameters of type JsonNodeModifier and TypeMethodDescriptionprotected ArrayNode
protected ArrayNode
protected ObjectNode
protected ArrayNode
protected boolean
BaseJsonNode._withXxxMayReplace
(JsonNode node, JsonNode.OverwriteMode overwriteMode) protected void
ArrayNode._withXxxSetArrayElement
(int index, JsonNode value) protected void
BaseJsonNode._withXxxVerifyReplace
(JsonPointer origPtr, JsonPointer currentPtr, JsonNode.OverwriteMode overwriteMode, boolean preferIndex, JsonNode toReplace) Method for adding specified node at the end of this array.boolean
ArrayNode.equals
(Comparator<JsonNode> comparator, JsonNode o) boolean
ObjectNode.equals
(Comparator<JsonNode> comparator, JsonNode o) Method for inserting specified child node as an element of this Array.ObjectNode.putIfAbsent
(String propertyName, JsonNode value) Method that will set value of specified property if (and only if) it had no set value previously.Method that will set specified element, replacing old value.Method for replacing value of specific property with passed value, and returning previous value (or null if none).Method that will set specified element, replacing old value.Method that will set specified property, replacing old value, if any.Method parameters in tools.jackson.databind.node with type arguments of type JsonNodeModifier and TypeMethodDescriptionArrayNode.addAll
(Collection<? extends JsonNode> nodes) Method for adding given nodes as child nodes of this array node.boolean
ArrayNode.equals
(Comparator<JsonNode> comparator, JsonNode o) boolean
ObjectNode.equals
(Comparator<JsonNode> comparator, JsonNode o) ArrayNode.findParents
(String propertyName, List<JsonNode> foundSoFar) MissingNode.findParents
(String fieldName, List<JsonNode> foundSoFar) ObjectNode.findParents
(String propertyName, List<JsonNode> foundSoFar) ValueNode.findParents
(String fieldName, List<JsonNode> foundSoFar) ArrayNode.findValues
(String propertyName, List<JsonNode> foundSoFar) MissingNode.findValues
(String fieldName, List<JsonNode> foundSoFar) ObjectNode.findValues
(String propertyName, List<JsonNode> foundSoFar) ValueNode.findValues
(String fieldName, List<JsonNode> foundSoFar) void
ObjectNode.forEachEntry
(BiConsumer<? super String, ? super JsonNode> action) abstract T
Method for removing matching those children (value) nodes container has that match given predicate.Method for adding given properties to this object node, overriding any existing values for those properties.Constructors in tools.jackson.databind.node with parameters of type JsonNodeConstructor parameters in tools.jackson.databind.node with type arguments of type JsonNodeModifierConstructorDescriptionArrayNode
(JsonNodeFactory nf, List<JsonNode> children) ObjectNode
(JsonNodeFactory nc, Map<String, JsonNode> children) -
Uses of JsonNode in tools.jackson.databind.ser
Methods in tools.jackson.databind.ser with type parameters of type JsonNodeModifier and TypeMethodDescription<T extends JsonNode>
TSerializationContextExt.valueToTree
(Object fromValue) Method that will convert given Java value (usually bean) into its equivalent Tree modelJsonNode
representation.Methods in tools.jackson.databind.ser with parameters of type JsonNodeModifier and TypeMethodDescriptionprotected void
BeanPropertyWriter._depositSchemaProperty
(ObjectNode propertiesNode, JsonNode schemaNode) -
Uses of JsonNode in tools.jackson.databind.ser.bean
Methods in tools.jackson.databind.ser.bean with parameters of type JsonNodeModifier and TypeMethodDescriptionprotected void
UnwrappingBeanPropertyWriter._depositSchemaProperty
(ObjectNode propertiesNode, JsonNode schemaNode) -
Uses of JsonNode in tools.jackson.databind.ser.jdk
Methods in tools.jackson.databind.ser.jdk that return JsonNodeModifier and TypeMethodDescriptionprotected JsonNode
IndexedStringListSerializer.contentSchema()
protected abstract JsonNode
StaticListSerializerBase.contentSchema()
protected JsonNode
StringCollectionSerializer.contentSchema()
-
Uses of JsonNode in tools.jackson.databind.util
Methods in tools.jackson.databind.util that return types with arguments of type JsonNodeModifier and TypeMethodDescriptionJacksonCollectors.toArrayNode()
JacksonCollectors.toArrayNode
(JsonNodeCreator nodeCreator)