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.
|
com.google.gwt.core.client.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, toNative
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
public static JsJsonObject create()
public final JsonValue get(String key)
JsonObject
get
in interface JsonObject
public JsonArray getArray(String key)
JsonObject
getArray
in interface JsonObject
public boolean getBoolean(String key)
JsonObject
getBoolean
in interface JsonObject
public double getNumber(String key)
JsonObject
getNumber
in interface JsonObject
public JsonObject getObject(String key)
JsonObject
getObject
in interface JsonObject
public String getString(String key)
JsonObject
getString
in interface JsonObject
public boolean hasKey(String key)
JsonObject
hasKey
in interface JsonObject
public String[] keys()
JsonObject
keys
in interface JsonObject
public com.google.gwt.core.client.JsArrayString keys0()
public void put(String key, JsonValue value)
JsonObject
put
in interface JsonObject
public void put(String key, String value)
JsonObject
put
in interface JsonObject
public void put(String key, double value)
JsonObject
put
in interface JsonObject
public void put(String key, boolean value)
JsonObject
put
in interface JsonObject
@Deprecated public void put0(String key, JsonValue value)
put(String, elemental.json.JsonValue)
instead.public void remove(String key)
JsonObject
remove
in interface JsonObject
Copyright © 2016. All rights reserved.