RFC7159 | A JSON parser that conforms RFC7159 | Parser library
kandi X-RAY | RFC7159 Summary
kandi X-RAY | RFC7159 Summary
A JSON parser that conforms RFC7159
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of RFC7159
RFC7159 Key Features
RFC7159 Examples and Code Snippets
Community Discussions
Trending Discussions on RFC7159
QUESTION
I need at one place to have the support for infinity, -infinity and NaN values in my JSON. Now though JSON does have support for these values, but is there any support for specifying about them in the schema of the same JSON instance, I mean the RFC specification says that these values are not supported under "number" type. However, when I validated one such JSON instance having infinity value against a schema with the type "number", it produced no error! Can someone help me to figure out why is this happening, and also if "number" type discards these values, how can I define the type of these values inside JSON schema. Here is my schema and instance which I used to validate.
Schema:
...ANSWER
Answered 2020-May-16 at 21:52JSON does not support neither infinity or NaN values (and never has, since the original json.org grammar). Neither does JSON Schema (because it is only defined for RFC8259-compliant JSON documents or structures).
This is due to interoperability reasons - otherwise each target language that does not support infinities or NaNs would need to always wrap these values.
Whether some validator accepts invalid json documents - does not really matter. They are still invalid.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install RFC7159
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page