douglascrockford/JSON-java — pull request #102 by WillFrew (2014-09-01 22:45:44+00:00)
Title: Added checks for extra non-whitespace characters after a closing '}'.

Since the JSON Standard doesn't specify that extra characters may be present after the closing brace of a JSON string, I have added checks and appropriate syntax error JSONException throws into the JSONObject(JSONTokener x) constructor.

Although the additions are repeated x3, I felt that the constructor was so simple creating an additional private method would over complicate the parsing logic. Let me know if you'd prefer a separate checkEOF method.