|
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
public abstract class ContainerNode
This intermediate base class is used for all container nodes, specifically, array and object nodes.
Nested Class Summary | |
---|---|
protected static class |
ContainerNode.NoNodesIterator
|
protected static class |
ContainerNode.NoStringsIterator
|
Constructor Summary | |
---|---|
protected |
ContainerNode()
|
Method Summary | |
---|---|
abstract void |
appendElement(JsonNode node)
|
abstract JsonNode |
getElementValue(int index)
Method for accessing value of the specified element of an array node. |
abstract JsonNode |
getFieldValue(String fieldName)
Method for accessing value of the specified field of an object node. |
String |
getValueAsText()
Method that will return valid String representation of the container value, if the node is a value node (method JsonNode.isValueNode() returns true), otherwise null. |
abstract void |
insertElement(int index,
JsonNode value)
|
boolean |
isContainerNode()
Method that returns true for container nodes: Arrays and Objects. |
abstract JsonNode |
removeElement(int index)
|
abstract JsonNode |
removeElement(String fieldName)
|
abstract JsonNode |
setElement(int index,
JsonNode value)
|
abstract JsonNode |
setElement(String fieldName,
JsonNode value)
|
abstract int |
size()
|
Methods inherited from class org.codehaus.jackson.map.JsonNode |
---|
equals, getBooleanValue, getDecimalValue, getDoubleValue, getElements, getFieldNames, getFieldValues, getIntValue, getLongValue, getNumberValue, getPath, getPath, getTextValue, isArray, isBigDecimal, isBoolean, isDouble, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isObject, isTextual, isValueNode, reportNoArrayMods, reportNoObjectMods, toString, writeTo |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ContainerNode()
Method Detail |
---|
public boolean isContainerNode()
JsonNode
Note: one and only one of methods JsonNode.isValueNode()
,
JsonNode.isContainerNode()
and JsonNode.isMissingNode()
ever
returns true for any given node.
isContainerNode
in class JsonNode
public String getValueAsText()
JsonNode
JsonNode.isValueNode()
returns true), otherwise null.
Note: to serialize nodes of any type, you should call
JsonNode.toString()
instead.
getValueAsText
in class JsonNode
public abstract int size()
size
in class JsonNode
public abstract JsonNode getElementValue(int index)
JsonNode
getElementValue
in class JsonNode
public abstract JsonNode getFieldValue(String fieldName)
JsonNode
getFieldValue
in class JsonNode
public abstract void appendElement(JsonNode node)
appendElement
in class JsonNode
public abstract void insertElement(int index, JsonNode value)
insertElement
in class JsonNode
public abstract JsonNode removeElement(int index)
removeElement
in class JsonNode
public abstract JsonNode removeElement(String fieldName)
removeElement
in class JsonNode
public abstract JsonNode setElement(int index, JsonNode value)
setElement
in class JsonNode
public abstract JsonNode setElement(String fieldName, JsonNode value)
setElement
in class JsonNode
|
JSON Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |