JSONTestSuite icon indicating copy to clipboard operation
JSONTestSuite copied to clipboard

Add category of tests for JSON extensions?

Open nicowilliams opened this issue 6 years ago • 1 comments

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 avatar Apr 22 '19 19:04 nicowilliams

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]

nicowilliams avatar Apr 22 '19 19:04 nicowilliams