Skip to content
New issue

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

Documentation for ordered_json should show proper use of the parse() function. #3325

Closed
gregmarr opened this issue Feb 9, 2022 · 2 comments · Fixed by #3326
Closed

Documentation for ordered_json should show proper use of the parse() function. #3325

gregmarr opened this issue Feb 9, 2022 · 2 comments · Fixed by #3326
Assignees
Labels
documentation release item: 🔨 further change solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@gregmarr
Copy link
Contributor

gregmarr commented Feb 9, 2022

https://json.nlohmann.me/features/object_order/ shows inserting objects in a particular order, but doesn't show how to properly use the parse() function to get the same result for existing JSON documents.

In particular, it needs to be this:

auto j = nlohmann::ordered_json::parse(text);

and not this:

nlohmann::ordered_json j = json::parse(text);
@gregmarr
Copy link
Contributor Author

gregmarr commented Feb 9, 2022

Can't change the labels, should be docs or enhancement or something like that.

@nlohmann nlohmann self-assigned this Feb 10, 2022
@nlohmann nlohmann added this to the Release 3.10.6 milestone Feb 10, 2022
@nlohmann nlohmann added solution: proposed fix a fix for the issue has been proposed and waits for confirmation release item: 🔨 further change labels Feb 10, 2022
@nlohmann
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation release item: 🔨 further change solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants