This commit is contained in:
marilynel
2025-09-21 16:37:20 -08:00
2 changed files with 5 additions and 0 deletions

View File

@@ -105,6 +105,8 @@ public class JSONArray implements Iterable<Object> {
if (nextChar == 0) {
// array is unclosed. No ']' found, instead EOF
throw x.syntaxError("Expected a ',' or ']'");
} else if (nextChar==',' && jsonParserConfiguration.isStrictMode()) {
throw x.syntaxError("Array content starts with a ','");
}
if (nextChar != ']') {
x.back();