FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #1008 from eleumik/eleumik-patch-1007-array · michael-ameri/JSON-java@b258ea3 · GitHub

Commit b258ea3

Browse files
authored
Merge pull request stleary#1008 from eleumik/eleumik-patch-1007-array
Update JSONArray.java for stleary#1007
2 parents a5e234a + 9de3005 commit b258ea3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/main/java/org/json/JSONArray.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ public JSONArray(JSONTokener x, JSONParserConfiguration jsonParserConfiguration)
105105
if (nextChar == 0) {
106106
// array is unclosed. No ']' found, instead EOF
107107
throw x.syntaxError("Expected a ',' or ']'");
108+
} else if (nextChar==',' && jsonParserConfiguration.isStrictMode()) {
109+
throw x.syntaxError("Array content starts with a ','");
108110
}
109111
if (nextChar != ']') {
110112
x.back();

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL