JS: Tolerate trailing comma in JSON objects

This commit is contained in:
Asger F
2025-04-28 10:43:46 +02:00
parent 6dd8114f00
commit 152d6f3c29
2 changed files with 24 additions and 7 deletions

View File

@@ -152,9 +152,6 @@ public class JSONParser {
char c = next();
switch (c) {
case '}':
if (!needsComma) {
raise("Trailing commas are not allowed in JSON.");
}
break out;
case ',':
if (!needsComma) {