Get the latest tech news
JSON for Classic C++
JSON for Classic C++. Contribute to jart/json.cpp development by creating an account on GitHub.
You can easily reason about the behavior of this library and determine if it meets the requirements of your production environment. With other JSON serializers that depend only on the C library and STL, floats are upcast to double so you'd be sending big ugly arrays like[0.2893893899832212, ...] which doesn't make sense, because most of those bits are made up, since a float32 can't hold that much precision. But with this library, the Json object will remember that you passed it a float, and then serialize it as such when you call toString(), thus allowing for more efficient readable responses.
Or read this on Hacker News