Hi,
I am trying to read and parse a JSON file stored at the root of 3DS SD Card (SDMC) into a data structure in C++.
Say I have a people.json file which looks like this:
Can I create some sort of data structure people which I can index by Anna and Ben as well as age and profession? What would be the data type of people? I thought it would be something similar to a (nested) map, but map values always have to have the same type, don't they?
I have worked with python before and my "goal" (which may be ill-set for C++) is to obtain the equivalent of a nested python dictionary.
Thanks.
Sent from my iPhone using Tapatalk
I am trying to read and parse a JSON file stored at the root of 3DS SD Card (SDMC) into a data structure in C++.
Say I have a people.json file which looks like this:
Code:
{"Anna" : {
"age": 18,
"profession": "student"},
"Ben" : {
"age" : 19,
"profession": "mechanic"}
}
Can I create some sort of data structure people which I can index by Anna and Ben as well as age and profession? What would be the data type of people? I thought it would be something similar to a (nested) map, but map values always have to have the same type, don't they?
I have worked with python before and my "goal" (which may be ill-set for C++) is to obtain the equivalent of a nested python dictionary.
Thanks.
Sent from my iPhone using Tapatalk
Last edited by Adel,