Closed slbayer closed 6 months ago
NaN
isn't part of the JSON data model, and therefore not part of the JSON Schema specification, so any results you get from it are somewhat bound to be nonsensical.
(For what it's worth, to elaborate on your specific example in the context of Python behavior, while nan
isn't greater than 0, it's not less than it either, as float("nan") < 0
is also false.)
In the most recent version of python-jsonschema (4.21.1) using Python 3.10.11 on macOS 13.6.4:
And so on. NaN is certainly a number, but it is not greater than 0, or greater than or equal to 0, etc.