Class ObjectValue
- java.lang.Object
-
- org.exoplatform.ws.frameworks.json.value.JsonValue
-
- org.exoplatform.ws.frameworks.json.value.impl.ObjectValue
-
public class ObjectValue extends JsonValue
- Version:
- $Id: ObjectValue.java 34417 2009-07-23 14:42:56Z dkatayev $
- Author:
- Andrey Parfonov
-
-
Constructor Summary
Constructors Constructor Description ObjectValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddElement(String key, JsonValue child)Add child value.JsonValuegetElement(String key)Get value by key.Iterator<String>getKeys()Get all keys for access values.booleanisObject()StringtoString()voidwriteTo(JsonWriter writer)Write value in given writer.-
Methods inherited from class org.exoplatform.ws.frameworks.json.value.JsonValue
addElement, getBooleanValue, getByteValue, getDoubleValue, getElements, getFloatValue, getIntValue, getLongValue, getNumberValue, getShortValue, getStringValue, isArray, isBoolean, isDouble, isLong, isNull, isNumeric, isString, size
-
-
-
-
Method Detail
-
addElement
public void addElement(String key, JsonValue child)
Add child value. This method must be used if isObject() gives true.- Overrides:
addElementin classJsonValue- Parameters:
key- the key.child- the child value.
-
isObject
public boolean isObject()
-
getElement
public JsonValue getElement(String key)
Get value by key.- Overrides:
getElementin classJsonValue- Parameters:
key- the key.- Returns:
- JsonVAlue with specified key.
-
writeTo
public void writeTo(JsonWriter writer) throws JsonException
Write value in given writer.- Specified by:
writeToin classJsonValue- Parameters:
writer- Writer.- Throws:
JsonException- if any errors occurs.
-
-