You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the program like this:
json obj = { {"result", "OK"}, {"model", "AAA" } };
string str = obj.dump();
which i want get { {"result", "OK"}, {"model", "AAA" } }, but it always return { {"model", "AAA" }, {"result", "OK"} }
The text was updated successfully, but these errors were encountered:
This is not possible. JSON objects are, by definition, unordered set of key-value pairs. In the library, I use a std::map to store objects, so the keys are always ordered alphabetically. You may want to try if you use https://github.com/nlohmann/fifo_map as object_t.
the program like this:
json obj = { {"result", "OK"}, {"model", "AAA" } };
string str = obj.dump();
which i want get { {"result", "OK"}, {"model", "AAA" } }, but it always return { {"model", "AAA" }, {"result", "OK"} }
The text was updated successfully, but these errors were encountered: