ibmruntimes / yieldable-json

Asynchronous JSON parser and stringify APIs that make use of generator patterns
Other
145 stars 22 forks source link

In some cases, the parsing should have failed, but succeeded. #35

Open julienbeaussier opened 2 years ago

julienbeaussier commented 2 years ago

Hello,

As we were testing the lib quite a lot came the question of compliance toward JSON specs.

We've found this very interesting paper https://seriot.ch/projects/parsing_json.html and in particular the JSONTestSuite repository that aim at assessing how compliant various JSON parsers can be with the spec.

When I ran the test suite for yieldable-json, several "should have failed, but succeeded" cases surfaced.

For example, but not only:

I'm wondering if we can do something about it, even though looking at the code, it seems sometimes to be on purpose.

Thank you!

Attached is the full list of cases that should have failed, but succeeded.

Screenshot 2022-05-12 at 11 21 22