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
For a json document like the example
{ "pi": 3.141, "happy": true, "name": "Niels", "nothing": null, "answer": { "everything": 42 }, "list": [1, 0, 2], "object": { "currency": "USD", "value": 42.99 } }
I don't find a method to get the name list of the fields, something like
json j; ifstream file("example.json"); file >> j; vector<string> names = j.fields();
so that I can get "pi", "happy", "name", "nothing", "answer", "list", "object".
"pi", "happy", "name", "nothing", "answer", "list", "object"
The text was updated successfully, but these errors were encountered:
A simple method is to iterate:
vector<string> fields; for (json::iterator it = j.begin(); it != j.end(); ++it) { fields.push_back(it.key()); }
Sorry, something went wrong.
No branches or pull requests
For a json document like the example
I don't find a method to get the name list of the fields, something like
so that I can get
"pi", "happy", "name", "nothing", "answer", "list", "object"
.The text was updated successfully, but these errors were encountered: