I need help from you guys.
I am currently using cJSON to parse Json formatted data.
Below are the data below.
{
"time" : {
"timezone" : string,
"ntpservers" : array<string>
},
"datetime" : {
"value" : "2013-10-23 03:35:45.182042",
"space-custom-class" : "datetime.datetime"
}
}
The problem I am facing is that I donβt know how to split the data into pairs of key values ββand save them on the map. I see that "time" is the key, but the value is a dictionary, so how to store it as the value "time", and this applies to the key "datetime". I know there is some kind of iteration, but I'm stuck. Since a value can be a primitive type, an array, or a dictionary, should it be a general object, such as a template? Some example will be very helpful.
Thanks in advance for your help.