Note
class was final temporarily for Jackson 2.2.
| Modifier and Type | Field and Description |
|---|---|
| protected final Map | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected JsonNode | _at(JsonPointer
Path expression to use ptr)Implements abstract com. 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, |
| protected boolean | |
| protected Map | _contentsToSerialize(SerializerProvider ctxt)
Helper method for encapsulating details of accessing child node entries to serialize. |
| protected ObjectNode | |
| protected ArrayNode | _withArray(JsonPointer origPtr, JsonPointer currentPtr, JsonNode.
Overrides com.
|
| protected ArrayNode | |
| protected ObjectNode | _withObject(JsonPointer origPtr, JsonPointer currentPtr, JsonNode.
Implements abstract com.
|
| protected ObjectNode | |
| public JsonToken | asToken()
Implements abstract com. Implements com. Method that can be used for efficient type detection when using stream abstraction for traversing nodes. |
| public ObjectNode | deepCopy()
Implements abstract com. 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. |
| public Iterator | elements()
Overrides com. Method for accessing all value nodes of this Node, iff this node is a JSON Array or Object node. |
| public boolean | equals(Comparator<JsonNode>
Object called to compare two scalar comparator, JsonNode o)JsonNode
instances, and return either 0 (are equals) or non-zero (not equal)Overrides com. Entry method for invoking customizable comparison, using passed-in
|
| public boolean | equals(Object
the reference object with which to compare. o)Implements abstract com. Equality for node objects is defined as full (deep) value equality. |
| public Iterator | fieldNames()
Overrides com. Implements com. Method for accessing names of all fields for this node, if (and only if) this node is an Object node. |
| public Iterator | fields()
Overrides com. Method to use for accessing all properties (with both names and values) of this JSON Object. |
| public ObjectNode | findParent(String
Name of field to look for propertyName)Implements abstract com. Method for finding a JSON Object that contains specified field, within this node or its descendants. |
| public List | findParents(String propertyName, List<JsonNode> foundSoFar)
Implements abstract com.
|
| public JsonNode | findValue(String
Name of field to look for propertyName)Implements abstract com. Method for finding the first JSON Object field with specified name in this node or its child nodes, and returning value it has. |
| public List | findValues(String propertyName, List<JsonNode> foundSoFar)
Implements abstract com.
|
| public List | findValuesAsText(String propertyName, List<String> foundSoFar)
Implements abstract com.
|
| public JsonNode | get(int
Index of the Array node element to access index)Implements abstract com. Implements com. Method for accessing value of the specified element of an array node. |
| public JsonNode | get(String
Name of the field (of Object node) to access propertyName)Implements abstract com. Implements com. Method for accessing value of the specified field of an object node. |
| public JsonNodeType | getNodeType()
Implements abstract com. Return the type of this node |
| public int | hashCode()
Implements abstract com. Returns a hash code value for this object. |
| public boolean | isEmpty(SerializerProvider serializers)
Overrides com. Method that may be called on instance to determine if it is considered "empty" for purposes of serialization filtering or not. |
| public boolean | isEmpty()
Overrides com. Convenience method that is functionally same as:
size() == 0
|
| public final boolean | isObject()
Overrides com. Implements com. Method that returns true if this node is an Object node, false otherwise. |
| public JsonNode | path(int
Index of the Array node element to access index)Implements abstract com. Implements com. This method is similar to |
| public JsonNode | path(String
Name of the field (of Object node) to access propertyName)Implements abstract com. Implements com. This method is similar to |
| public Set | properties()
Overrides com. Method to use for accessing all properties (with both names and values) of this JSON Object. |
| public JsonNode | Returns: Old value of the property, if any;null if there was no
old value.Name of property to set propertyName, JsonNode value)
Deprecated
Since 2.4 use either
set(String, JsonNode) or replace(String, JsonNode),
Method that will set specified property, replacing old value, if any. |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | Returns: This node (to allow chaining)Method for setting value of a field to specified numeric value. |
| public ObjectNode | Returns: This node (to allow chaining)Method for setting value of a field to specified numeric value. |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public JsonNode | Returns: This node after adding/replacing property values (to allow chaining)Properties to add properties)
Deprecated
Since 2.4 use
setAll(Map),
Method for adding given properties to this object node, overriding any existing values for those properties. |
| public JsonNode | Returns: This node (to allow chaining)Object of which properties to add to this object other)
Deprecated
Since 2.4 use
setAll(ObjectNode),
Method for adding all properties of the given Object, overriding any existing values for those properties. |
| public ArrayNode | |
| public JsonNode | Returns: Old value of the property, if any (in which case value was not changed); null if there was no old value (in which case value is now set)Name of property to set propertyName, JsonNode Value to set to property (if and only if it had no value previously);
if null, will be converted to a value)NullNode first.Method that will set value of specified property if (and only if) it had no set value previously. |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public ObjectNode | |
| public JsonNode | |
| public ObjectNode | Returns: This node after removing entriesNames of fields to remove propertyNames)Method for removing specified field properties out of this ObjectNode. |
| public ObjectNode | Returns: This node after removing all entriesImplements abstract com. Method for removing all properties, such that this ObjectNode will contain no properties after call. |
| public JsonNode | Returns: Old value of the property; null if there was no such property with valueProperty of which value to replace propertyName, JsonNode Value to set property to, replacing old value if any value)Method for replacing value of specific property with passed value, and returning value (or null if none). |
| public JsonNode | required(String
Name of property to access propertyName)Overrides com. Method is functionally equivalent to
|
| public ObjectNode | Returns: This node (to allow call chaining)Fields to retain in this ObjectNode propertyNames)Method for removing all properties out of this ObjectNode except for ones specified in argument. |
| public ObjectNode | |
| public void | serialize(JsonGenerator g, SerializerProvider provider)
Implements abstract com. Implements com. Method that can be called to serialize this node and all of its descendants using specified JSON generator. |
| protected void | serializeFilteredContents(final JsonGenerator g, final SerializerProvider ctxt, final boolean trimEmptyArray, final boolean skipNulls)
Helper method shared and called by |
| public void | serializeWithType(JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer)
Implements abstract com. Implements com. Type information is needed, even if JsonNode instances are "plain" JSON, since they may be mixed with other types. |
| public <T extends JsonNode> T | |
| public <T extends JsonNode> T | |
| public <T extends JsonNode> T | Returns: This node after addition (to allow chaining)Object of which properties to add to this object other)Method for adding all properties of the given Object, overriding any existing values for those properties. |
| public int | size()
Implements abstract com. Implements com. Method that returns number of child nodes this node contains: for Array nodes, number of child elements, for Object nodes, number of fields, and for all other nodes 0. |
| public ObjectNode | with(String exprOrProperty)
Overrides com.
Deprecated
Method that works in one of possible ways, depending on whether
|
| public ArrayNode | withArray(String
Either exprOrProperty)JsonPointer expression for full access (if valid
pointer expression), or the name of property for the ArrayNode.Overrides com. Method that works in one of possible ways, depending on whether
|
| public ArrayNode | withArrayProperty(String
Name of property that has or will have propName)ArrayNode as valueOverrides com. Method similar to
withArray(JsonPointer.compile("/"+propName), OverwriteMode.NULLS, false);
|
| public ObjectNode | withObject(String
JsonPointer expression to use (if valid as one),
or, if not (no leading "/"), property name to match.Overrides com. Method that works in one of possible ways, depending on whether
|
| public ObjectNode | withObjectProperty(String
Name of property that has or will have propName)ObjectNode as valueOverrides com. Method similar to
withObject(JsonPointer.compile("/"+propName), OverwriteMode.NULLS, false);
|
| public <T extends JsonNode> T | |
| public <T extends JsonNode> T | Returns: This node after removing entriesNames of properties to remove propertyNames)Method for removing specified field properties out of this ObjectNode. |