public final class JsonParser extends Object
JsonElement
sConstructor | Description |
---|---|
JsonParser() |
Modifier and Type | Method | Description |
---|---|---|
JsonElement |
parse(JsonReader json) |
Returns the next value from the JSON stream as a parse tree.
|
JsonElement |
parse(Reader json) |
Parses the specified JSON string into a parse tree
|
JsonElement |
parse(String json) |
Parses the specified JSON string into a parse tree
|
public JsonElement parse(String json) throws JsonSyntaxException
json
- JSON textJsonElement
s corresponding to the specified JSONJsonParseException
- if the specified text is not valid JSONJsonSyntaxException
public JsonElement parse(Reader json) throws JsonIOException, JsonSyntaxException
json
- JSON textJsonElement
s corresponding to the specified JSONJsonParseException
- if the specified text is not valid JSONJsonIOException
JsonSyntaxException
public JsonElement parse(JsonReader json) throws JsonIOException, JsonSyntaxException
JsonParseException
- if there is an IOException or if the specified
text is not valid JSONJsonIOException
JsonSyntaxException
Copyright © 2018. All rights reserved.