public final class JsonParser
extends java.lang.Object
JsonElements| Constructor and Description |
|---|
JsonParser() |
| Modifier and Type | Method and Description |
|---|---|
JsonElement |
parse(JsonReader json)
Returns the next value from the JSON stream as a parse tree.
|
JsonElement |
parse(java.io.Reader json)
Parses the specified JSON string into a parse tree
|
JsonElement |
parse(java.lang.String json)
Parses the specified JSON string into a parse tree
|
public JsonElement parse(java.lang.String json) throws JsonSyntaxException
json - JSON textJsonElements corresponding to the specified JSONJsonParseException - if the specified text is not valid JSONJsonSyntaxExceptionpublic JsonElement parse(java.io.Reader json) throws JsonIOException, JsonSyntaxException
json - JSON textJsonElements corresponding to the specified JSONJsonParseException - if the specified text is not valid JSONJsonIOExceptionJsonSyntaxExceptionpublic JsonElement parse(JsonReader json) throws JsonIOException, JsonSyntaxException
JsonParseException - if there is an IOException or if the specified
text is not valid JSONJsonIOExceptionJsonSyntaxExceptionCopyright © 2018. All Rights Reserved.