public class JsonObject extends AbstractJsonObject<JsonValue>
propertieschangeSupport| Constructor and Description |
|---|
JsonObject() |
JsonObject(File file) |
JsonObject(Object json) |
JsonObject(Reader reader) |
JsonObject(String json) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cloneProperties(JsonObject clone) |
JsonArray |
getAsArray(String property)
Returns the property value as array.
|
Boolean |
getAsBoolean(String property)
Returns the property value as boolean or
null if it has not been set. |
Float |
getAsFloat(String property)
Returns the property value as double or
null if it has not been set. |
Integer |
getAsInteger(String property)
Returns the property value as integer or
null if it has not been set. |
JsonObject |
getAsObject(String property)
Returns the property value as object.
|
Object |
getAsRaw(String property)
Returns the property raw value or
null if it has not been set. |
String |
getAsString(String property)
Returns the property value as string or
null if it has not been set. |
protected void |
initialize() |
boolean |
is(String property,
Type type)
Returns whether the property is instance of the given type.
|
boolean |
isArray(String property)
Returns whether the property is instance of an array.
|
boolean |
isObject(String property)
Returns whether the property is instance of an entity.
|
void |
set(String property,
Object value)
Sets a new value for the given property.
|
clear, get, getOwnProperties, has, parse, parseField, parseValue, prepareJson, remove, set, sizefromJson, fromJson, fromJson, fromJson, getFieldByName, getFieldName, getFields, listen, prepareJsonValue, toJsonaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, removePropertyChangeListener, removePropertyChangeListenerpublic JsonObject()
public JsonObject(Object json)
public JsonObject(String json)
public JsonObject(File file) throws IOException
IOExceptionpublic JsonObject(Reader reader) throws IOException
IOExceptionprotected void initialize()
initialize in class JsonEntitypublic boolean is(String property, Type type)
property - the propertytype - the typetrue property is instance of typefalse property is not an instance of type or it doesn't exist.public boolean isArray(String property)
property - the propertytrue property is an arrayfalse property is not an array or it doesn't exist.getAsArray(java.lang.String)public boolean isObject(String property)
property - the propertytrue property is an entityfalse property is not an entity or it doesn't exist.getAsObject(java.lang.String)public Object getAsRaw(String property)
null if it has not been set.property - the propertypublic JsonArray getAsArray(String property)
property - the propertypublic String getAsString(String property)
null if it has not been set.property - the propertypublic Boolean getAsBoolean(String property)
null if it has not been set.property - the propertypublic Integer getAsInteger(String property)
null if it has not been set.property - the propertypublic Float getAsFloat(String property)
null if it has not been set.property - the propertypublic JsonObject getAsObject(String property)
property - the propertypublic void set(String property, Object value)
set in class AbstractJsonObject<JsonValue>property - the propertyvalue - the new valueprotected void cloneProperties(JsonObject clone)
Copyright © 2013. All Rights Reserved.