|
JSON Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.map.JsonNode
org.codehaus.jackson.map.impl.ContainerNode
org.codehaus.jackson.map.impl.ObjectNode
public final class ObjectNode
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.codehaus.jackson.map.impl.ContainerNode |
---|
ContainerNode.NoNodesIterator, ContainerNode.NoStringsIterator |
Constructor Summary | |
---|---|
protected |
ObjectNode()
|
Method Summary | |
---|---|
void |
appendElement(JsonNode node)
|
boolean |
equals(Object o)
Let's mark this standard method as abstract to ensure all implementation classes define it |
JsonNode |
getElementValue(int index)
Method for accessing value of the specified element of an array node. |
Iterator<String> |
getFieldNames()
|
JsonNode |
getFieldValue(String fieldName)
Method for accessing value of the specified field of an object node. |
Iterator<JsonNode> |
getFieldValues()
|
JsonNode |
getPath(int index)
This method is similar to JsonNode.getElementValue(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
JsonNode.isMissingNode() ) will be returned. |
JsonNode |
getPath(String fieldName)
This method is similar to JsonNode.getFieldValue(java.lang.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
JsonNode.isMissingNode() ) will be returned. |
void |
insertElement(int index,
JsonNode value)
|
boolean |
isObject()
|
JsonNode |
removeElement(int index)
|
JsonNode |
removeElement(String fieldName)
|
JsonNode |
setElement(int index,
JsonNode value)
|
JsonNode |
setElement(String fieldName,
JsonNode value)
|
int |
size()
|
String |
toString()
Let's mark this standard method as abstract to ensure all implementation classes define it |
void |
writeTo(JsonGenerator jg)
Method that can be called to serialize this node and all of its descendants using specified JSON generator. |
Methods inherited from class org.codehaus.jackson.map.impl.ContainerNode |
---|
getValueAsText, isContainerNode |
Methods inherited from class org.codehaus.jackson.map.JsonNode |
---|
getBooleanValue, getDecimalValue, getDoubleValue, getElements, getIntValue, getLongValue, getNumberValue, getTextValue, isArray, isBigDecimal, isBoolean, isDouble, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isTextual, isValueNode, reportNoArrayMods, reportNoObjectMods |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ObjectNode()
Method Detail |
---|
public boolean isObject()
isObject
in class JsonNode
public int size()
size
in class ContainerNode
public JsonNode getElementValue(int index)
JsonNode
getElementValue
in class ContainerNode
public JsonNode getFieldValue(String fieldName)
JsonNode
getFieldValue
in class ContainerNode
public Iterator<String> getFieldNames()
getFieldNames
in class JsonNode
public Iterator<JsonNode> getFieldValues()
getFieldValues
in class JsonNode
public JsonNode getPath(int index)
JsonNode
JsonNode.getElementValue(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
JsonNode.isMissingNode()
) will be returned. This allows for
convenient and safe chained access via path calls.
getPath
in class JsonNode
public JsonNode getPath(String fieldName)
JsonNode
JsonNode.getFieldValue(java.lang.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
JsonNode.isMissingNode()
) will be returned. This allows for
convenient and safe chained access via path calls.
getPath
in class JsonNode
public void appendElement(JsonNode node)
appendElement
in class ContainerNode
public void insertElement(int index, JsonNode value)
insertElement
in class ContainerNode
public JsonNode removeElement(int index)
removeElement
in class ContainerNode
public JsonNode removeElement(String fieldName)
removeElement
in class ContainerNode
public JsonNode setElement(int index, JsonNode value)
setElement
in class ContainerNode
public JsonNode setElement(String fieldName, JsonNode value)
setElement
in class ContainerNode
public void writeTo(JsonGenerator jg) throws IOException, JsonGenerationException
JsonNode
writeTo
in class JsonNode
IOException
JsonGenerationException
public boolean equals(Object o)
JsonNode
equals
in class JsonNode
public String toString()
JsonNode
toString
in class JsonNode
|
JSON Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |