Apply corner-case fixes under instruction
This commit is contained in:
@@ -195,8 +195,8 @@ public class JSONObject {
|
||||
* @param x
|
||||
* A JSONTokener object containing the source string.
|
||||
* @throws JSONException
|
||||
* If there is a syntax error in the source string or a
|
||||
* duplicated key.
|
||||
* If there is a syntax error in the source string or a
|
||||
* duplicated key.
|
||||
*/
|
||||
public JSONObject(JSONTokener x) throws JSONException {
|
||||
this(x, x.getJsonParserConfiguration());
|
||||
@@ -210,8 +210,8 @@ public class JSONObject {
|
||||
* @param jsonParserConfiguration
|
||||
* Variable to pass parser custom configuration for json parsing.
|
||||
* @throws JSONException
|
||||
* If there is a syntax error in the source string or a
|
||||
* duplicated key.
|
||||
* If there is a syntax error in the source string or a
|
||||
* duplicated key.
|
||||
*/
|
||||
public JSONObject(JSONTokener x, JSONParserConfiguration jsonParserConfiguration) throws JSONException {
|
||||
this(x, jsonParserConfiguration, x.isAtStart());
|
||||
@@ -225,20 +225,20 @@ public class JSONObject {
|
||||
* A JSONTokener object containing the source string.
|
||||
* @param jsonParserConfiguration
|
||||
* Variable to pass parser custom configuration for json parsing.
|
||||
* @param eofRequired
|
||||
* @param isInitial
|
||||
* A boolean that determines whether this object is the root.
|
||||
* @throws JSONException
|
||||
* If there is a syntax error in the source string or a
|
||||
* duplicated key.
|
||||
* If there is a syntax error in the source string or a
|
||||
* duplicated key.
|
||||
*/
|
||||
JSONObject(JSONTokener x, JSONParserConfiguration jsonParserConfiguration, boolean eofRequired) throws JSONException {
|
||||
JSONObject(JSONTokener x, JSONParserConfiguration jsonParserConfiguration, boolean isInitial) throws JSONException {
|
||||
this();
|
||||
|
||||
if (x.nextClean() != '{') {
|
||||
throw x.syntaxError("A JSONObject text must begin with '{'");
|
||||
}
|
||||
for (;;) {
|
||||
if (parseJSONObject(x, jsonParserConfiguration, eofRequired)) {
|
||||
if (parseJSONObject(x, jsonParserConfiguration, isInitial)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user