I am trying to parse a Json file with rapidJson (v 0.11) but I fail to do it with what seems to be a simple array. Here is the structure of my file :
[{"id": "my_id1","type":"my_type1"},
{"id": "my_id2","type":"my_type2"},
...
]
It seems that rapidJson does not read that type of file starting with an array.. Is there a way to handle that ?
Here is a extract of the code I tried to use :
FILE * pFile = fopen ("my_json.json" , "r");
rapidjson::FileStream is(pFile);
rapidjson::Document document;
document.ParseStream<0>(is);
and i am stuck right here because i am supposed to access to the elements by this syntax value = document["key"]
, but I don't have any "key" at the first level...