Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.json.client
Class JSONParser

    java.lang.Object
      com.google.gwt.json.client.JSONParser

    public class JSONParser

extends java.lang.Object

Parses the string representation of a JSON object into a set of JSONValue-derived objects.

See Also:
  `JSONValue`

Method Summary
`static JSONValue` | `parse(java.lang.String jsonString)` Evaluates a trusted JSON string and returns its JSONValue representation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### parse

    public static JSONValue parse(java.lang.String jsonString)

  Evaluates a trusted JSON string and returns its JSONValue representation. CAUTION! For efficiency, this method is implemented using the JavaScript `eval()` function, which can execute arbitrary script. DO NOT pass an untrusted string into this method.

  Parameters:
    `jsonString` - a JSON object to parse
  Returns:
    a JSONValue that has been built by parsing the JSON string
  Throws:
    `java.lang.NullPointerException` - if `jsonString` is `null`
    `java.lang.IllegalArgumentException` - if `jsonString` is empty

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD