dropbox / json11

A tiny JSON library for C++11.
MIT License
2.55k stars 615 forks source link

When dumping non-finite floating point values, output 'null'. #36

Closed jcmonnin closed 9 years ago

jcmonnin commented 9 years ago

In JSON the float point special values NaN and Infinity should serialised to 'null'. Previously, 'snprintf' in 'dump' was giving a string that isn't compliant to the JSON standard.

j4cbo commented 9 years ago

Thanks! Can you fill out our CLA at https://opensource.dropbox.com/cla/ and then I can merge this?