|
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.ArrayNode
public final class ArrayNode
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.codehaus.jackson.map.impl.ContainerNode |
|---|
ContainerNode.NoNodesIterator, ContainerNode.NoStringsIterator |
| Constructor Summary | |
|---|---|
protected |
ArrayNode()
|
| 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 |
Iterator<JsonNode> |
getElements()
|
JsonNode |
getElementValue(int index)
Method for accessing value of the specified element of an array node. |
JsonNode |
getFieldValue(String fieldName)
Method for accessing value of the specified field of an object node. |
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 |
isArray()
|
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, getFieldNames, getFieldValues, getIntValue, getLongValue, getNumberValue, getTextValue, isBigDecimal, isBoolean, isDouble, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isObject, isTextual, isValueNode, reportNoArrayMods, reportNoObjectMods |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ArrayNode()
| Method Detail |
|---|
public boolean isArray()
isArray in class JsonNodepublic int size()
size in class ContainerNodepublic JsonNode getElementValue(int index)
JsonNode
getElementValue in class ContainerNodepublic JsonNode getFieldValue(String fieldName)
JsonNode
getFieldValue in class ContainerNodepublic Iterator<JsonNode> getElements()
getElements in class JsonNodepublic JsonNode getPath(String fieldName)
JsonNodeJsonNode.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 JsonNodepublic JsonNode getPath(int index)
JsonNodeJsonNode.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 JsonNodepublic void appendElement(JsonNode node)
appendElement in class ContainerNode
public void insertElement(int index,
JsonNode value)
insertElement in class ContainerNodepublic JsonNode removeElement(int index)
removeElement in class ContainerNodepublic 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 JsonNodeIOException
JsonGenerationExceptionpublic boolean equals(Object o)
JsonNode
equals in class JsonNodepublic 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 | |||||||||