This PR supersedes the Cinder-proprietary JsonTree in favor of the widely library by Niels Lohmann, JSON for Modern C++.
For (temporary) backwards compatibility, the previous implementation is still accessible via src\cinder\JsonTree.cpp and include\cinder\JsonTree.h. This PR updates a couple of samples, as well as the Unit tests.
Note that this implementation is mostly a using statement, in the sense that the nlohmann::json is mapped to ci::Json. It also includes convenience methods for loadJson() and writeJson(), and some helpful wrappers from @num3ric that allow direct usage of some core Cinder types.
Particularly for performance-sensitive users, other libraries may be more suitable, but this inclusion in Cinder is primarily for convenience and doesn't introduce any dependencies on the underlying library (or compile time penalties) when ci::Json is not used.
This PR supersedes the Cinder-proprietary
JsonTree
in favor of the widely library by Niels Lohmann, JSON for Modern C++.For (temporary) backwards compatibility, the previous implementation is still accessible via
src\cinder\JsonTree.cpp
andinclude\cinder\JsonTree.h
. This PR updates a couple of samples, as well as the Unit tests.Note that this implementation is mostly a
using
statement, in the sense that thenlohmann::json
is mapped toci::Json
. It also includes convenience methods forloadJson()
andwriteJson()
, and some helpful wrappers from @num3ric that allow direct usage of some core Cinder types.Particularly for performance-sensitive users, other libraries may be more suitable, but this inclusion in Cinder is primarily for convenience and doesn't introduce any dependencies on the underlying library (or compile time penalties) when
ci::Json
is not used.