Skip to content

Commit

Permalink
Removed JSONTokener.back()
Browse files Browse the repository at this point in the history
  • Loading branch information
migueltt authored Aug 14, 2017
1 parent f177c97 commit 2e0a813
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ public JSONObject(JSONTokener x) throws JSONException {
if (key != null) {
// Check if key exists
if (this.opt(key) != null) {
// back one token to point to the last key character
x.back();
// key already exists
throw x.syntaxError("Duplicate key \"" + key + "\"");
}
// Only add value if non-null
Expand Down

0 comments on commit 2e0a813

Please sign in to comment.