You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicJSONArray(Stringstr) throwsJSONException {//constructor parsing a string representing a JSON array
72
+
Scannerscanner = newScanner(str);
73
+
_parse(scanner);
74
+
if (!scanner.eos()) thrownewJSONException("parsing error due to unexpected trailing characters");
75
+
}
76
+
77
+
publicJSONArray(Scannerscanner) throwsJSONException {//constructor using Scanner, note that parsing stops after a json value is found, even if extra characters remain in scanner
publicJSONNumber(Stringstr) throwsJSONException {//constructor parsing a string representing a JSON number
47
+
Scannerscanner = newScanner(str);
48
+
_parse(scanner);
49
+
if (!scanner.eos()) thrownewJSONException("parsing error due to unexpected trailing characters");
50
+
}
51
+
52
+
publicJSONNumber(Scannerscanner) throwsJSONException {//constructor using Scanner, note that parsing stops after a json value is found, even if extra characters remain in scanner
0 commit comments