com.google.gson
Class JsonParser
java.lang.Object
com.google.gson.JsonParser
public final class JsonParser
- extends Object
A parser to parse Json into a parse tree of JsonElements
- Since:
- 1.3
- Author:
- Inderjeet Singh, Joel Leitch
JsonParser
public JsonParser()
parse
public JsonElement parse(String json)
throws JsonParseException
- Parses the specified JSON string into a parse tree
- Parameters:
json - JSON text
- Returns:
- a parse tree of
JsonElements corresponding to the specified JSON
- Throws:
JsonParseException - if the specified text is not valid JSON- Since:
- 1.3
parse
public JsonElement parse(Reader json)
throws JsonParseException
- Parses the specified JSON string into a parse tree
- Parameters:
json - JSON text
- Returns:
- a parse tree of
JsonElements corresponding to the specified JSON
- Throws:
JsonParseException - if the specified text is not valid JSON- Since:
- 1.3
Copyright © 2008-2009. All Rights Reserved.