We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d83534 commit f177c97Copy full SHA for f177c97
JSONObject.java
@@ -236,15 +236,15 @@ public JSONObject(JSONTokener x) throws JSONException {
236
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();
+ if (this.opt(key) != null) {
+ // back one token to point to the last key character
+ x.back();
242
throw x.syntaxError("Duplicate key \"" + key + "\"");
243
- }
+ }
244
// Only add value if non-null
245
Object value = x.nextValue();
246
if (value!=null) {
247
- this.put(key, value);
+ this.put(key, value);
248
}
249
250
0 commit comments