|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.smartgwt.client.util.JSON
public class JSON
Utilities for working with JSON data.
| Constructor Summary | |
|---|---|
JSON()
|
|
| Method Summary | |
|---|---|
static com.google.gwt.core.client.JavaScriptObject |
decode(java.lang.String jsonString)
De-serialize an object from JSON. |
static java.lang.String |
encode(com.google.gwt.core.client.JavaScriptObject object)
Serialize an object as a JSON string. |
static java.lang.String |
encode(com.google.gwt.core.client.JavaScriptObject object,
JSONEncoder settings)
Serialize an object as a JSON string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSON()
| Method Detail |
|---|
public static java.lang.String encode(com.google.gwt.core.client.JavaScriptObject object)
Automatically handles circular references - see circularReferenceMode.
Note that using the String produced by this API with JSON.decode will not
successfully preserve dates. Use JSONEncoder.setDateFormat "dateConstructor" to have
dates round-trip properly.
Because GWT does not support Java reflection, JSON encoding cannot discover the properties of an arbitrary Java POJO. The following objects are supported:
object - object to serialize
public static java.lang.String encode(com.google.gwt.core.client.JavaScriptObject object,
JSONEncoder settings)
Automatically handles circular references - see circularReferenceMode.
Note that using the String produced by this API with JSON.decode will not
successfully preserve dates. Use JSONEncoder.setDateFormat "dateConstructor" to have
dates round-trip properly.
Because GWT does not support Java reflection, JSON encoding cannot discover the properties of an arbitrary Java POJO. The following objects are supported:
object - object to serializesettings - optional settings for encoding
public static com.google.gwt.core.client.JavaScriptObject decode(java.lang.String jsonString)
jsonString - JSON data to be de-serialized
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||