We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
The text was updated successfully, but these errors were encountered:
Ok, i had to use
json j = json::parse(sJson);
instead of
json j = sJson;
The latter seems to add the sJson's text as a value to the json document. After all this constructor doesn't make much sense for me...
Sorry, something went wrong.
You could also use a user-defined string literal:
json j = R"( { "key": "value", "another key": [1,2,3] } )"_json;
No branches or pull requests
Hi, i couldn't figure out how to iterate over some simple json data like this:
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.
The text was updated successfully, but these errors were encountered: