JSONTestSuite
JSONTestSuite copied to clipboard
Add category of tests for JSON extensions?
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:
- 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.
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]