Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import or otherwise use testsuite from "Parsing JSON is a Minefield 💣" #4

Open
fingolfin opened this issue Oct 27, 2016 · 1 comment

Comments

@fingolfin
Copy link
Member

fingolfin commented Oct 27, 2016

See https://seriot.ch/projects/parsing_json.html

I did not yet look, but it seems that it should be possible to hook up the json package with the test runner of that project... we might not be able to pass all tests, esp. those related to unicode / UTF-16, but I wonder about e.g. crashes.

@ChrisJefferson
Copy link
Member

I did a quick and dirty hook-up, and fixes a couple of things that weren't getting accepted, and some things that shouldn't have been parsed (like [-]). Now everything is accepted that should be, but we accept a bunch of extra things.

There is a bunch of number formats we technically shouldn't be parsing (like 012 we parse as 12 rather than ignoring as possible octal, and 2.2e4), because I pass them through to GAP early, and GAP happily parses them. I wouldn't mind if someone wanted to make the parser stricter, but I'm not bothered.

The only thing we now don't parse is UTF-16, which I certainly don't care about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants