java.lang.Object | ||
↳ | com.google.gwt.json.client.JSONValue | |
↳ | com.google.gwt.json.client.JSONObject |
Represents a JSON object. A JSON object consists of a set of properties.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new JSONObject from the supplied JavaScript value.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Tests whether or not this JSONObject contains the specified property.
| |||||||||||
Gets the JSONValue associated with the specified property.
| |||||||||||
Returns the underlying JavaScript object that this object wraps.
| |||||||||||
Returns
this , as this is a JSONObject. | |||||||||||
Returns the set of properties defined on this JSONObject.
| |||||||||||
Assign the specified property to the specified value in this JSONObject.
| |||||||||||
Determines the number of properties on this object.
| |||||||||||
Converts a JSONObject into a JSON representation that can be used to
communicate with a JSON service.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.json.client.JSONValue
| |||||||||||
From class
java.lang.Object
|
Creates a new JSONObject from the supplied JavaScript value.
Tests whether or not this JSONObject contains the specified property.
key | the property to search for |
---|
true
if the JSONObject contains the specified property
Returns true
if other
is a JSONObject
wrapping the same underlying object.
Gets the JSONValue associated with the specified property.
key | the property to access |
---|
null
if the
property does not existNullPointerException | if key is null
|
---|
Returns the underlying JavaScript object that this object wraps.
Returns this
, as this is a JSONObject.
null
otherwise.
Returns the set of properties defined on this JSONObject. The returned set is immutable.
Assign the specified property to the specified value in this JSONObject. If the property already has an associated value, it is overwritten.
key | the property to assign |
---|---|
jsonValue | the value to assign |
null
if the
property did not existNullPointerException | if key is null
|
---|
Determines the number of properties on this object.
Converts a JSONObject into a JSON representation that can be used to communicate with a JSON service.