| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected JsonNode | _at(JsonPointer
Path expression to use ptr)Implements abstract com. null is returned.
|
| public abstract JsonToken | asToken()
Redeclares com. Implements abstract com. |
| public <T extends JsonNode> T | deepCopy()
Implements abstract com. |
| public final ObjectNode | findParent(String
Name of field to look for fieldName)Implements abstract com. |
| public final List | findParents(String fieldName, List<JsonNode> foundSoFar)
Implements abstract com. |
| public final JsonNode | findValue(String
Name of field to look for fieldName)Implements abstract com. |
| public final List | findValues(String fieldName, List<JsonNode> foundSoFar)
Implements abstract com. |
| public final List | findValuesAsText(String fieldName, List<String> foundSoFar)
Implements abstract com. |
| public final JsonNode | get(int
Index of the Array node element to access index)Implements abstract com. Implements com. |
| public final JsonNode | get(String
Name of the field (of Object node) to access fieldName)Overrides com. Implements com. |
| public final boolean | has(int
Index to check index)Overrides com. |
| public final boolean | has(String
Name of element to check fieldName)Overrides com. |
| public final boolean | hasNonNull(int index)
Overrides com. has(int), but that will
return false for explicitly added nulls.
|
| public final boolean | hasNonNull(String fieldName)
Overrides com. has(String), but that will
return false for explicitly added nulls.
|
| public boolean | isEmpty()
Overrides com.
size() == 0
|
| public final JsonNode | path(int
Index of the Array node element to access index)Implements abstract com. Implements com. get(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 for
isMissingNode) will be returned.
|
| public final JsonNode | path(String
Name of the field (of Object node) to access fieldName)Implements abstract com. Implements com. get(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 for
isMissingNode) will be returned.
|
| public void | serializeWithType(JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer)
Implements abstract com. Implements com. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| ValueNode | back to summary |
|---|---|
| protected ValueNode() | |
| _at | back to summary |
|---|---|
| protected JsonNode _at(JsonPointer ptr) Implements abstract com. Doc from 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,
| |
| asToken | back to summary |
|---|---|
| public abstract JsonToken asToken() Redeclares com. Implements abstract com. Doc from com. Method that can be used for efficient type detection
when using stream abstraction for traversing nodes.
Will return the first
| |
| deepCopy | back to summary |
|---|---|
| public <T extends JsonNode> T deepCopy() Implements abstract com. All current value nodes are immutable, so we can just return them as is.
| |
| findParent | back to summary |
|---|---|
| public final ObjectNode findParent(String fieldName) Implements abstract com. Doc from com. Method for finding a JSON Object that contains specified field, within this node or its descendants. If no matching field is found in this node or its descendants, returns null.
| |
| findParents | back to summary |
|---|---|
| public final List Implements abstract com.
| |
| findValue | back to summary |
|---|---|
| public final JsonNode findValue(String fieldName) Implements abstract com. Doc from com. Method for finding a JSON Object field with specified name in this node or its child nodes, and returning value it has. If no matching field is found in this node or its descendants, returns null. | |
| findValues | back to summary |
|---|---|
| public final List Implements abstract com.
| |
| findValuesAsText | back to summary |
|---|---|
| public final List Implements abstract com.
| |
| get | back to summary |
|---|---|
| public final JsonNode get(int index) Implements abstract com. Implements com. Doc from com. Method for accessing value of the specified element of an array node. For other nodes, null is always returned.
For array nodes, index specifies
exact location within array and allows for efficient iteration
over child elements (underlying storage is guaranteed to
be efficiently indexable, i.e. has random-access to elements).
If index is less than 0, or equal-or-greater than
Note if the element value has been explicitly set as
| |
| get | back to summary |
|---|---|
| public final JsonNode get(String fieldName) Overrides com. Implements com. Doc from com. Method for accessing value of the specified field of an object node. If this node is not an object (or it does not have a value for specified field name), or if there is no field with such name, null is returned. Note if the property value has been explicitly set as
| |
| has | back to summary |
|---|---|
| public final boolean has(int index) Overrides com. Doc from com. Method that allows checking whether this node is JSON Array node and contains a value for specified index If this is the case (including case of specified indexing having null as value), returns true; otherwise returns false. Note array element indexes are 0-based. This method is equivalent to: node.get(index) != null Note this method will return
| |
| has | back to summary |
|---|---|
| public final boolean has(String fieldName) Overrides com. Doc from com. Method that allows checking whether this node is JSON Object node and contains value for specified property. If this is the case (including properties with explicit null values), returns true; otherwise returns false. This method is equivalent to: node.get(fieldName) != null(since return value of get() is node, not value node contains) Note when explicit | |
| hasNonNull | back to summary |
|---|---|
| public final boolean hasNonNull(int index) Overrides com. Doc from com. Method that is similar to This method is equivalent to: node.get(index) != null && !node.get(index).isNull()
| |
| hasNonNull | back to summary |
|---|---|
| public final boolean hasNonNull(String fieldName) Overrides com. Doc from com. Method that is similar to This method is functionally equivalent to: node.get(fieldName) != null && !node.get(fieldName).isNull()
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Overrides com. Doc from com. Convenience method that is functionally same as:
size() == 0
for all node types.
| |
| path | back to summary |
|---|---|
| public final JsonNode path(int index) Implements abstract com. Implements com. Doc from com. This method is similar to
| |
| path | back to summary |
|---|---|
| public final JsonNode path(String fieldName) Implements abstract com. Implements com. Doc from com. This method is similar to
| |
| serializeWithType | back to summary |
|---|---|
| public void serializeWithType(JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer) throws IOException Implements abstract com. Implements com. Doc from com. Type information is needed, even if JsonNode instances are "plain" JSON, since they may be mixed with other types.
| |