public class JSON extends Object
JSONObjects instances. Use the
append(java.lang.String, boolean) methods to appends simple property values.
Use the enter(String) method to append a child JSONObject as
a property value. Use the exit() method to go back to the parent
object.
For instance:
JSON.create("start","value")
.enter("child")
.append("childProp","v")
.exit()
.append("end","value");
will generate the following JSON:
{
start:"value",
child:
{
childProp:"v"
},
end:"value"
}
TODO: Jsonarray| Modifier | Constructor and Description |
|---|---|
protected |
JSON(JSON json)
Create a new child instance of the given parent
|
| Modifier and Type | Method and Description |
|---|---|
JSON |
append(String propName,
boolean value) |
JSON |
append(String propName,
double value) |
JSON |
append(String propName,
String value) |
JSON |
appendNull(String propName) |
com.google.gwt.json.client.JSONObject |
build() |
protected com.google.gwt.json.client.JSONObject |
cloneObject() |
static JSON |
create() |
static JSON |
create(String propName,
boolean value) |
static JSON |
create(String propName,
double value) |
static JSON |
create(String propName,
String value) |
JSON |
enter(String propName)
Put a new
JSONObject into the given property and return the child
JSON builder. |
JSON |
exit() |
com.google.gwt.core.client.JavaScriptObject |
toJSO() |
protected JSON(JSON json)
json - public static final JSON create()
public JSON enter(String propName)
JSONObject into the given property and return the child
JSON builder.propName - public JSON exit()
public com.google.gwt.json.client.JSONObject build()
JSONObject.public com.google.gwt.core.client.JavaScriptObject toJSO()
JSONObject casted to
JavaScriptObject.protected com.google.gwt.json.client.JSONObject cloneObject()
Copyright © 2013 gwt-d3. All Rights Reserved.