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

Can I disable sorting of json values #2219

Closed
VladimirBalun opened this issue Jun 25, 2020 · 1 comment
Closed

Can I disable sorting of json values #2219

VladimirBalun opened this issue Jun 25, 2020 · 1 comment
Labels
kind: question solution: duplicate the issue is a duplicate; refer to the linked issue instead

Comments

@VladimirBalun
Copy link

VladimirBalun commented Jun 25, 2020

Hello, I have the following code:

nlohmann::json data = { {"service", "abc" }, { "level", "info" }, {"traceId", "aaabbbccc" }};
std::cout << data << std::endl;

Output will be:
{"level":"info","service":"abc","traceId":"aaabbbccc"}

Can I disable sorting of values for the following output without sorting:
{"service":"abc","level":"info","traceId":"aaabbbccc"}

@nlohmann
Copy link
Owner

Duplicate of #2179.

@nlohmann nlohmann added the solution: duplicate the issue is a duplicate; refer to the linked issue instead label Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: question solution: duplicate the issue is a duplicate; refer to the linked issue instead
Projects
None yet
Development

No branches or pull requests

2 participants