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

Corrected readme #218

Merged
merged 1 commit into from
Mar 4, 2016
Merged

Corrected readme #218

merged 1 commit into from
Mar 4, 2016

Conversation

Annihil
Copy link
Contributor

@Annihil Annihil commented Mar 2, 2016

I found an error in the example of usage when casting map STL container to json, leading users to think that it keeps insertion order instead of alphabetical order of the keys.

Internally, the elements in a map are always sorted by its key following a specific strict weak ordering criterion indicated by its internal comparison object (of type Compare).
With string type, the default comparator is alphabetical order, and thus two come after three.
nlohmann added a commit that referenced this pull request Mar 4, 2016
@nlohmann nlohmann merged commit 8ee3d24 into nlohmann:master Mar 4, 2016
@nlohmann
Copy link
Owner

nlohmann commented Mar 4, 2016

Thanks for noting!

@nlohmann nlohmann added this to the Release 2.0.0 milestone Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants