MCPcopy
hub / github.com/google/gson / parseString

Method parseString

gson/src/main/java/com/google/gson/JsonParser.java:91–93  ·  view source on GitHub ↗

Parses the specified JSON string into a parse tree. An exception is thrown if the JSON string has multiple top-level JSON elements, or if there is trailing data. <p>The JSON string is parsed in {@linkplain JsonReader#setStrictness(Strictness) lenient mode}. @param json JSON text @return a parse tr

(String json)

Source from the content-addressed store, hash-verified

89 * @since 2.8.6
90 */
91 public static JsonElement parseString(String json) throws JsonSyntaxException {
92 return parseReader(new StringReader(json));
93 }
94
95 /**
96 * Parses the complete JSON string provided by the reader into a parse tree. An exception is

Calls 1

parseReaderMethod · 0.95