Skip to content

Commit 71e5a70

Browse files
committed
JS: Also tolerate trailing commas in objects
1 parent a8b7970 commit 71e5a70

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

javascript/extractor/src/com/semmle/js/parser/JSONParser.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ private JSONObject readObject(int startoff, Position start) throws ParseError {
152152
char c = next();
153153
switch (c) {
154154
case '}':
155-
if (!needsComma) {
156-
raise("Trailing commas are not allowed in JSON.");
157-
}
158155
break out;
159156
case ',':
160157
if (!needsComma) {

0 commit comments

Comments
 (0)