I have a return string from my webservice as such:
std::string json_str = "{"Count":18,"Result":[{"Description":"DATABASE TASK MODE VALUE","Name":"TASK","Val":24,"addID":0,"CreatedAt":"2015-08-12T17:57:03.954Z","ModifiedAt":"2015-08-13T20:41:30.900Z","CreatedBy":"00000000-0000-0000-0000-000000000000","ModifiedBy":"00000000-0000-0000-0000-000000000000","Owner":"00000000-0000-0000-0000-000000000000","Id":"89fb5320-411b-11e5-a0dc-8babbc75a180","Meta":{"Permissions":{"CanRead":true,"CanUpdate":true,"CanDelete":true}}}, ...etc ]}"
this code works
document.Parse(json_str.c_str()).HasParseError())
assert(document.IsObject());
rapidjson::Value::MemberIterator localdata_0 = document.FindMember("89fb5320-411b-11e5-a0dc-8babbc75a180");
But then it fails on these lines
assert(localdata_0 != document.MemberEnd());
assert(localdata_0->value.IsDouble());
Is there an easy way to format my string to the correct json format as such?
const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } ";