Open tiwarisarthak opened 7 years ago
I have the following code
ifstream fin; fin.open("config.json", ios::in); char a[500]; int size=0; while(!fin.eof()) { fin.get(a[size]); ++size; } a[size]='\0'; string b(a); fin.close(); const char *work = b.c_str(); Document document; document.Parse(work); assert(document.IsObject()); assert(document.HasMember("id")); assert(document["id"].IsString()); string id_match="assetexplorer"; string config_id(document["id"].GetString()); assert(document.HasMember("type")); assert(document["type"].IsString()); string type_match="config"; string config_type(document["type"].GetString());
the contents of the json file are { "id": "assetexplorer", "type": "config", "method": "log", "extractparam": "C://windows" }
{ "id": "assetexplorer", "type": "config", "method": "log", "extractparam": "C://windows" }
The program keeps failing with the following error.
Assertion failed: false, file e:\poc\rapidjson/document.h, line 1103
The directory is the location of the file in my directory.
What's on line 1103 of document.h ?
document.h
Try to shorten the test case to the minimal one that still exhibits the issue.
I have the following code
the contents of the json file are
{ "id": "assetexplorer", "type": "config", "method": "log", "extractparam": "C://windows" }
The program keeps failing with the following error.
The directory is the location of the file in my directory.