|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectplayn.flash.json.impl.JsonUtil
public class JsonUtil
Direct port of json2.js at http://www.json.org/json2.js to GWT.
| Constructor Summary | |
|---|---|
JsonUtil()
|
|
| Method Summary | ||
|---|---|---|
static String |
escapeControlChars(String text)
Convert special control characters into unicode escape format. |
|
static
|
parse(String json)
|
|
static String |
quote(String value)
Safely escape an arbitrary string as a JSON string literal. |
|
static String |
stringify(JsonValue jsonValue)
Converts a Json Object to Json format. |
|
static String |
stringify(JsonValue jsonValue,
int spaces)
Converts a JSO to Json format. |
|
static String |
stringify(JsonValue jsonValue,
String indent)
Converts a Json object to Json formatted String. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JsonUtil()
| Method Detail |
|---|
public static String escapeControlChars(String text)
public static <T extends JsonValue> T parse(String json)
throws JsonException
JsonExceptionpublic static String quote(String value)
public static String stringify(JsonValue jsonValue)
jsonValue - json object to stringify
public static String stringify(JsonValue jsonValue,
int spaces)
jsonValue - json object to stringifyspaces - number of spaces to indent in pretty print mode
public static String stringify(JsonValue jsonValue,
String indent)
jsonValue - json object to stringifyindent - optional indentation prefix for pretty printing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||