-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Add ordered_json specialization with ordered object keys #2258
Conversation
instead of hard-coding it for std::map's value_type
This is more comprehensive and the "my_workaround_fifo_map" wrapper does not allow to infer value type as required in this branch. This reverts commit 064a9c9.
This reverts commit 5fe3d39.
to extract the actual ObjectType::value_type Still fails on older compilers (GCC <= 5.5)
so that it can handle pair<const Key,...>
(forgotten in previous commit!)
Co-authored-by: Niels Lohmann <niels.lohmann@gmail.com>
Simple ordered_json that works on all supported compilers
…2179 � Conflicts: � single_include/nlohmann/json.hpp
🔖 Release itemThis issue/PR will be part of the next release of the library. This template helps preparing the release notes. Type
Description
|
Hi @nlohmann Thank you 👍 |
Yes, |
@nlohmann The new additions are really great, I guess I will wait for the next release, hopefully it comes soon. 👍 |
No specific reason - I only learned C++11 when I started the library, and so I was not aware of |
Great addition, I guess this will help a lot of users :) One question: Is it also possible to use |
@cellard0or Use |
@cellard0or The release version 3.9.0 is buggy in that regard. This is fixed with #2319 and will be released as 3.9.1 soon. |
This PR adds a container
ordered_map
which maintains the order of inserted keys. This container is then used inordered_json
, a specialization ofbasic_json
type.Closes #2179.
Closes #1817.
Closes #1717.
Closes #1106.
Closes #952.
Closes #727.
Closes #660.
Closes #543.
Closes #424.
Closes #106.