Hi, i couldn't figure out how to iterate over some simple json data like this:
string sJson= "{" "\"data\": [" "{" "\"id\": \"1000\"" "}," "{" "\"id\": \"1001\"" "}," "{" "\"id\": \"1002\"" "}" "]" "}";
Please could you provide an example how to print all the ids? In addition not being able to forward declare your stuff is a big show stopper.
You could also use a user-defined string literal:
json j = R"( { "key": "value", "another key": [1,2,3] } )"_json;
Activity
nlohmann commentedon Jul 27, 2017
You could also use a user-defined string literal: