Links:
http://rapidjson.org/ https://github.com/Tencent/rapidjson
https://github.com/open-source-parsers/jsoncpp
https://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-J...
Links:
http://rapidjson.org/ https://github.com/Tencent/rapidjson
https://github.com/open-source-parsers/jsoncpp
https://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-J...
Our primary use is to parse http://cocodataset.org/ metadata files and RapidJson is 100% faster.
So, twice as fast - it parses the dataset in half the time?
Previously we used rapid json which is faster but the syntax of the nlohmann json is nicer and it is much quicker to develop with.. we also use python a lot so the familiarity between the 2 is also useful, some of the other C++ json libs can have quite convoluted api’s for dealing with values, objects and arrays.
The overwhelming majority of our IO is reading / writing data files, but those are stored in an optimized binary format. The configuration / metadata accounts for a much smaller fraction of IO. For this tiny fraction we care about flexibility and readability, a slow JSON parser is fine.
At some point it seems like a general mindset shifted from making things efficient at every level to assuming things don’t matter if you’re probably doing something worse anyway.
If reading/writing is the hot path things are different, though.
I would point out that its convenience in large part depends on extensive use of cast operators, which can lead to some tricky corner cases. It is also the only component in one of my projects that confuses xlclang++ on AIX.
If I had enormous globs of JSON to read I might use something faster (I believe there's a very fast library that uses SIMD instructions) but my needs are quite limited: basically exchanging snippets of JSON with a network service. So clarity was far more important than performance.