I want something like the below in json c++ code
{
"Numofbooks": 2
"book1": { "title":"saaas", "ISBN":234234, "author":"sdjjh"}
"book2": { "title":"fdfrg", "ISBN":8978, "author":"dttt"}
}
I have already checked this link and it this, but it doesnt show how to do it in C++ code. I am using this JSON CPP library, http://jsoncpp.sourceforge.net.
So to code I should do something like belo
Json::objectvalue obj;
obj[numofbooks] = 2;
Next how do I fill this list of book1 and book2?? I am not getting this..Please advice