We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f177c97 commit 2e0a813Copy full SHA for 2e0a813
1 file changed
JSONObject.java
@@ -237,8 +237,7 @@ public JSONObject(JSONTokener x) throws JSONException {
237
if (key != null) {
238
// Check if key exists
239
if (this.opt(key) != null) {
240
- // back one token to point to the last key character
241
- x.back();
+ // key already exists
242
throw x.syntaxError("Duplicate key \"" + key + "\"");
243
}
244
// Only add value if non-null
0 commit comments