JS: Tolerate trailing comma in JSON array

Previously we'd fail to extract some tsconfig.json files because of this.
This commit is contained in:
Asger F
2025-04-09 23:14:56 +02:00
parent 800dd168c2
commit 1434f7acd2
2 changed files with 22 additions and 7 deletions

View File

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