Join GitHub today
Updated json to correctly handle double and float nan #860
Previously a double nan was serializing to the string "nan" which is invalid JSON.
Updated to use undefined instead of nan for both serializing and deserializing.
ECMA-262 states "The undefined value is [...] used when a variable has not been assigned a value", while "The null value [...] represents the null, empty or non-existent reference."
While I was at it, cleaned up incorrect grammar and spelling mistakes.
added a commit
this pull request
Oct 9, 2014
Thanks. std_data_json looks interesting. I wasn't aware of it previously. After a quick look through the source, it looks quite a bit different from what you've built with Vibe.d. Do you intend for it to work with the serialisation build into vibe.d?
Where will this leave the state of the Vibe.d BSON library? It seems that it was once almost identical to the JSON code but I think the JSON code has improved over time whilst the BSON has remained fairly static.