|
|||||||||
| 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 JavaScriptObject |
decode(String jsonString)
De-serialize an object from JSON. |
static String |
encode(JavaScriptObject object)
Serialize an object as a JSON string. |
static String |
encode(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 String encode(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 String encode(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 JavaScriptObject decode(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 | ||||||||