Class 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 Detail

      • parse

        public static <T extends com.google.gwt.core.client.JavaScriptObject> T parse​(String jsonAsString)
        Parse a string containing JSON into a JavaScriptObject.
        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 a JavaScriptObject into a string representation.
        Parameters:
        json - a JavaScript object to be converted to a string
        Returns:
        JSON in string representation