4 ms·
I prefer boost json
by versatran01 5y ago
I prefer boost json
- beached_whale 5y agoIt does seem to have a very similar interface to this and has the performance of RapidJSON. So a nice balance in that regard.
- darknavi 5y agoHow do people go about integrating boost these days? For any cross platform projects I use CMake and Boost seems like a _very_ scary library to try and build/ship on multiple platforms.
- chrisjericho 5y agoI use CMake almost exclusively (even for Windows) and using "find_package(Boost REQUIRED)" works most of the time. A lot of common boost libraries (algorithm, geometry) are header only and are not much of a hassle to include. IIRC, you would need to modify the statement to "find_package(Boost REQUIRED COMPONENTS filesystem)" if you want to use boost dependencies that need a separate .dll/.so (in this case boost::filesystem). However I rarely need to use these, so I may be wrong.
- nly 5y agoCMake supports Boost out of the box, you just need to set BOOST_ROOT to your Boost install path. With proper CI it's not a big deal
- rualca 5y agoWhat exactly makes Boost scary to ship? I understand that Boost requires some attention to build right across platforms (see zlib support in Windows) but other than this it's pretty straight forward to add a FindBoost statement to your code, and move onto other things.
- Johnnynator 5y agoYou should be able to build and include boost json as a standalone subproject in CMake if you are using C++17. (Or also possible to use as header only lib) It gets far more complicated with C++11, since you also need a ton of other boost modules there. For more Details you can read the Readme of it. https://github.com/boostorg/json https://github.com/boostorg/json
- geokon 5y agoUse Hunter for dependency management https://github.com/cpp-pm/hunter https://github.com/cpp-pm/hunter There is a bit of a learning curve, but it's the only dependency manager that does things right (all from within CMake)
- jcelerier 5y agowget boost_1_77.tar.gz tar xaf boost* cmake ... -DBOOST_ROOT=.../boost_1_77 Works for the huge majority of boost ; most parts that required a build were the parts that were integrated in c++ like thread, regex, chrono, filesystem
- electroly 5y agoFWIW Boost.Json in particular doesn't have any source files, it's just header-only templates. You don't actually need to build or link boost to use it; you just need the header files to be in the include path.