mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-27 15:52:28 +00:00
Make ljson more strict (#482)
This commit is contained in:
parent
30cc2c8dc1
commit
12d9f7ade6
6 changed files with 116 additions and 131 deletions
|
@ -269,3 +269,34 @@ assert(not DecodeJson(' [- 1] '))
|
|||
|
||||
-- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_just_minus.json
|
||||
assert(not DecodeJson(' [-] '))
|
||||
|
||||
-- [jart] v8 permits the \xb9 but doesn't permit the trailing comma
|
||||
-- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_lone_continuation_byte_in_key_and_trailing_comma.json
|
||||
assert(not DecodeJson(" {\"\xb9\":\"0\",} "))
|
||||
|
||||
-- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_object_double_colon.json
|
||||
assert(not DecodeJson(' {"x"::"b"} '))
|
||||
|
||||
-- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_number_and_several_commas.json
|
||||
assert(not DecodeJson(' [1,,] '))
|
||||
|
||||
-- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_number_and_comma.json
|
||||
assert(not DecodeJson(' [1,] '))
|
||||
|
||||
-- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_missing_value.json
|
||||
assert(not DecodeJson(' [ , ""] '))
|
||||
|
||||
-- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_just_comma.json
|
||||
assert(not DecodeJson(' [,] '))
|
||||
|
||||
-- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_extra_comma.json
|
||||
assert(not DecodeJson(' ["",] '))
|
||||
|
||||
-- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_double_extra_comma.json
|
||||
assert(not DecodeJson(' ["x",,] '))
|
||||
|
||||
-- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_double_comma.json
|
||||
assert(not DecodeJson(' [1,,2] '))
|
||||
|
||||
-- https://github.com/nst/JSONTestSuite/tree/d64aefb55228d9584d3e5b2433f720ea8fd00c82/test_parsing/n_array_comma_and_number.json
|
||||
assert(not DecodeJson(' [,1] '))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue