Allow trailing comma

master
Vitaliy Filippov 2023-02-23 01:15:28 +03:00
parent 52a3af664f
commit fd37016cf8
1 changed files with 4 additions and 0 deletions

View File

@ -769,6 +769,8 @@ struct JsonParser final {
return fail("expected ',' in object, got " + esc(ch));
ch = get_next_token();
if (ch == '}')
break;
}
return data;
}
@ -792,6 +794,8 @@ struct JsonParser final {
return fail("expected ',' in list, got " + esc(ch));
ch = get_next_token();
if (ch == ']')
break;
(void)ch;
}
return data;