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

Add category of tests for JSON extensions? #93

Open
nicowilliams opened this issue Apr 22, 2019 · 1 comment
Open

Add category of tests for JSON extensions? #93

nicowilliams opened this issue Apr 22, 2019 · 1 comment

Comments

@nicowilliams
Copy link

nicowilliams commented Apr 22, 2019

The RFC permits extensions. For example, jq accepts some representations of infinity, and is a bit liberal about number representations. A number of n_* tests could be labeled as "failure might be due to the parser supporting extensions".

From RFC7159:

  1. Parsers

A JSON parser transforms a JSON text into another representation. A
JSON parser MUST accept all texts that conform to the JSON grammar.
A JSON parser MAY accept non-JSON forms or extensions.

@nicowilliams
Copy link
Author

E.g.,

test_parsing/n_number_+Inf.json:[+Inf]
test_parsing/n_number_-NaN.json:[-NaN]
test_parsing/n_number_Inf.json:[Inf]
test_parsing/n_number_NaN.json:[NaN]
test_parsing/n_number_infinity.json:[Infinity]
test_parsing/n_number_minus_infinity.json:[-Infinity]

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

1 participant