Package org.jboss.hal.js
Class Json
- java.lang.Object
-
- org.jboss.hal.js.Json
-
public class Json extends Object
A static API to the browser's JSON object. TODO(knorton) : Remove this when generated DOM bindings are submitted.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends com.google.gwt.core.client.JavaScriptObject>
Tparse(String jsonAsString)Parse a string containing JSON into aJavaScriptObject.static Stringstringify(com.google.gwt.core.client.JavaScriptObject json)Convert aJavaScriptObjectinto a string representation.
-
-
-
Method Detail
-
parse
public static <T extends com.google.gwt.core.client.JavaScriptObject> T parse(String jsonAsString)
Parse a string containing JSON into aJavaScriptObject.- Type Parameters:
T- the overlay type to expect from the parse- Parameters:
jsonAsString-- Returns:
- a JavaScript object constructed from the parse
-
stringify
public static String stringify(com.google.gwt.core.client.JavaScriptObject json)
Convert aJavaScriptObjectinto a string representation.- Parameters:
json- a JavaScript object to be converted to a string- Returns:
- JSON in string representation
-
-