-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
NaN encoded as 2.696539702293474e308 #509
Comments
Yes. This is not currently checked. With the current |
Thanks for the prompt fix! While Nans should be checked, I am unsure about the Inf case. |
Yes, it is fine with me, thank you. On 20 January 2016 at 12:23, Milo Yip notifications@github.com wrote:
|
Fix #509 by checking Nan/Inf when writing a double
Fix #509 by checking Nan/Inf when writing a double
I am aware that NaNs are not part of the JSON standard and I am not advocating adding the ability to encode/decode them.
However, currently NaNs are silently encoded as
2.696539702293474e308
which is very error prone.It would be preferable to have an error thrown in Writer::Double() if a NaN is passed.
The text was updated successfully, but these errors were encountered: