
public final class JsJsonObject extends JsJsonValue implements JsonObject
| Modifier | Constructor and Description |
|---|---|
protected |
JsJsonObject() |
| Modifier and Type | Method and Description |
|---|---|
static JsJsonObject |
create() |
JsonValue |
get(String key)
Return the element (uncoerced) as a JsonValue.
|
JsonArray |
getArray(String key)
Return the element (uncoerced) as a JsonArray.
|
boolean |
getBoolean(String key)
Return the element (uncoerced) as a boolean.
|
double |
getNumber(String key)
Return the element (uncoerced) as a number.
|
JsonObject |
getObject(String key)
Return the element (uncoerced) as a JsonObject If the type is not an object,,
this can result in runtime errors.
|
String |
getString(String key)
Return the element (uncoerced) as a String.
|
boolean |
hasKey(String key)
Test whether a given key has present.
|
String[] |
keys()
All keys of the object.
|
JsArrayString |
keys0() |
void |
put(String key,
boolean value)
Set a given key to the given boolean value.
|
void |
put(String key,
double value)
Set a given key to the given double value.
|
void |
put(String key,
JsonValue value)
Set a given key to the given value.
|
void |
put(String key,
String value)
Set a given key to the given String value.
|
void |
put0(String key,
JsonValue value)
Deprecated.
use
put(String, elemental.json.JsonValue) instead. |
void |
remove(String key)
Remove a given key and associated value from the object.
|
asBoolean, asNumber, asString, getType, jsEquals, toJson, toNativecast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toStringpublic static JsJsonObject create()
public final JsonValue get(String key)
JsonObjectget in interface JsonObjectpublic JsonArray getArray(String key)
JsonObjectgetArray in interface JsonObjectpublic boolean getBoolean(String key)
JsonObjectgetBoolean in interface JsonObjectpublic double getNumber(String key)
JsonObjectgetNumber in interface JsonObjectpublic JsonObject getObject(String key)
JsonObjectgetObject in interface JsonObjectpublic String getString(String key)
JsonObjectgetString in interface JsonObjectpublic boolean hasKey(String key)
JsonObjecthasKey in interface JsonObjectpublic String[] keys()
JsonObjectkeys in interface JsonObjectpublic JsArrayString keys0()
public void put(String key, JsonValue value)
JsonObjectput in interface JsonObjectpublic void put(String key, String value)
JsonObjectput in interface JsonObjectpublic void put(String key, double value)
JsonObjectput in interface JsonObjectpublic void put(String key, boolean value)
JsonObjectput in interface JsonObject@Deprecated public void put0(String key, JsonValue value)
put(String, elemental.json.JsonValue) instead.public void remove(String key)
JsonObjectremove in interface JsonObjectCopyright © 2016. All rights reserved.