ccan icon indicating copy to clipboard operation
ccan copied to clipboard

JSON parser test failures

Open lod opened this issue 7 years ago • 1 comments
trafficstars

A JSON test suite has been produced which tests most commonly available JSON parsers against JSON corner cases http://seriot.ch/parsing_json.php https://github.com/nst/JSONTestSuite

These two test files are reported as causing the parser to crash. https://github.com/nst/JSONTestSuite/blob/master/test_parsing/n_structure_100000_opening_arrays.json https://github.com/nst/JSONTestSuite/blob/master/test_parsing/n_structure_open_array_object.json

These two test files are reported as being incorrectly parsed. https://github.com/nst/JSONTestSuite/blob/master/test_parsing/y_object_escaped_null_in_key.json https://github.com/nst/JSONTestSuite/blob/master/test_parsing/y_string_null_escape.json

I have not yet personally tested any of the tests.

lod avatar May 01 '18 09:05 lod

The two test files reported as incorrectly parsed are due to the presence of null characters.

Not supporting these seems to be a deliberate decision, presumably as doing otherwise would interfere with the standard string structure and be a pain to manage and use.

Explicitly documenting this variation from the standard would probably be worthwhile however.

lod avatar May 01 '18 13:05 lod