From: Andris P. <and...@ik...> - 2011-10-19 17:21:52
|
On 10/19/2011 04:58 PM, Matt Berlin wrote: > I am having difficulty creating a JSON object with jsoncpp. > > I have managed to get an array in the form [...[...]...], but I require the data to be int he form > {...{...}...} > > From the documentation, I believe this would be done using Json::ObjectValue, but I have not been > able to find any examples of how to get this working -- all examples I've been able to find rely on > pre-created JSON. > > Thank you, > Json::Value x; x["a"]["b"] = "c"; x["a"]["d"] = 1; std::cout << x << std::endl; |