Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inserting an OFXJsonElement in another one #26

Open
cgiles opened this issue Sep 26, 2017 · 0 comments
Open

Inserting an OFXJsonElement in another one #26

cgiles opened this issue Sep 26, 2017 · 0 comments

Comments

@cgiles
Copy link

cgiles commented Sep 26, 2017

Hi, I read this forum post : https://forum.openframeworks.cc/t/create-your-own-json-data-and-save-json-file/16560

And tried to reproduce the example with ofxJSON.

But when I use an ofxJsonElement as value for another OfxJsonElement, it compiles fine, but crash when the code is executed.

My code in ofApp.h :

ofxJSONElement list;
ofxJSONElement papa;

My code in ofApp.cpp::setup :

list["yolo"]["pit"] = 1;
list["yolo"]["put"] = "morteau";
list["yolo"]["pot"] = 1.36;
papa["lol"]=666;
list["yolo"]["pot"]["54"] = papa;
ofLog() << list ;

The error I got :

std::_Tree_comp_alloc<std::_Tmap_traits<Json::Value::CZString,Json::Value,std::lessJson::Value::CZString,std::allocator<std::pair<Json::Value::CZString
const ,Json::Value> >,0> >::_Myhead(...) returned 0x5C28F5C7.

I use of0.9.8 with vs2015.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant