MCPcopy Create free account
hub / github.com/apache/solr / fromJSONStrict

Method fromJSONStrict

solr/solrj/src/java/org/noggit/ObjectBuilder.java:43–48  ·  view source on GitHub ↗

like #fromJSON(String), but also check that there is nothing remaining in the given string after closing bracket. Throws ParseException otherwise.

(String json)

Source from the content-addressed store, hash-verified

41 * string after closing bracket. Throws {@link ParseException} otherwise.
42 */
43 public static Object fromJSONStrict(String json) throws IOException {
44 JSONParser p = new JSONParser(json);
45 final Object val = getVal(p);
46 checkEOF(p);
47 return val;
48 }
49
50 public static void checkEOF(JSONParser p) throws IOException {
51 if (p.nextEvent() != JSONParser.EOF) {

Callers 3

mergeJSONMethod · 0.95
_testMethod · 0.95
testStrictPositiveMethod · 0.95

Calls 2

getValMethod · 0.95
checkEOFMethod · 0.95

Tested by 2

_testMethod · 0.76
testStrictPositiveMethod · 0.76