cinder / Cinder

Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.
http://libcinder.org
Other
5.34k stars 943 forks source link

remove JsonTree from cinder.lib #2092

Open richardeakin opened 5 years ago

richardeakin commented 5 years ago

I believe this is our last dependency on boost for toolsets that contain <filesystem> and <system> (almost all of them). Many of us have stopped using it already in favor of either using the already-shipped jsoncpp directly, or any other C++ json library of their choice.

There are some samples that use JsonTree still, I think we should update those to use jsoncpp. There's also a (not very good) unit test for it that we need to remove.

Should we move ci::JsonTree somewhere so that projects that are using it can continue to do so after updating cinder? Maybe someone would be up for hosting a cinderblock that contains ci::JsonTree?

brucelane commented 5 years ago

I use it a lot, but removing dependency on boost is more important. I could do a Cinder block for it, but not sure I would succeed...

paulhoux commented 5 years ago

I'm all for removing it. It's much easier to just use the jsoncpp library directly. Like you said, most of us have been doing that for years now. No use keeping code that makes things worse, instead of better.

vinjn commented 5 years ago

Where are we at this issue? Really want to kill boost forever.

richardeakin commented 5 years ago

If someone would like to help, the low hanging fruit is doing a quick search through the samples and updating them to use jsoncpp directly. We then just need to decide where the deprecated JsonTree will live, outside of the main lib.

vinjn commented 5 years ago

I can take a look.

godefv commented 2 years ago

Another serious reason to remove it : My project depends on a shared library which loads the system's jsoncpp library, which conflicts with the one built by cinder because of the global variable Json::Value::null. The program compiles but crashes while loading the shared libraries. Removing Json::Value::null from cinder and linking to the system's jsoncpp library before linking to cinder fixes this issue.