[Smtk-developers] JSON in SMTK

David Thompson david.thompson at kitware.com
Mon Sep 11 18:24:46 EDT 2017


> It seems that we are using a C - library for JSON processing - has anyone looked at C++ 11 libs like:
> https://github.com/nlohmann/json

It looks nice. I would like to kick the tires a little, but it looks good enough to replace cJSON if it doesn't have any fatal flaws.

@Ben jsoncpp is really terrible:
+ it is not concise to use (I'm not sure nlohmann is either because it lives in the "nlohmann" namespace);
+ it is slow -- see https://github.com/miloyip/nativejson-benchmark#parsing-time where cJSON takes 25ms and jsoncpp takes 166ms; nlohmann takes 71 ms which is not great but look at how easy it is to use; and
+ it is heavy (243k-LOC vs 42k for nlohmann and 27k for cJSON)

We should help move CMake/VTK away from jsoncpp instead of designing software by seniority.

	David


More information about the Smtk-developers mailing list