c++ - How to add a sub-group to a boost property tree? -


i trying understand syntax boost property tree, it's not jumping out @ me. using boost property_tree represent simple json document. in 1 case, want construct such document, have:

property_tree::wptree json; json.put(_eventname.c_str(), l""); 

and works fine, want include values underneath event like:

{ "event_name": { "time":"4pm", "day":"saturday" } }

what want is:

property_tree::wptree json; auto subtree = json.put(_eventname.c_str(), l""); for(auto val : values)   subtree.put(val->first.c_str(), val->second.c_str()); 

but seems throw exception. i've attempted handle on through online docs, i'm still little unsure. i'm thinking maybe solution construct new wptree sub values, , add tree json document, seems bit counterintuitive me. advice?


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -