You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
474 B
16 lines
474 B
#include <iostream>
|
|
#include <iomanip>
|
|
#include <nlohmann/json.hpp>
|
|
|
|
using json = nlohmann::json;
|
|
|
|
int main()
|
|
{
|
|
nlohmann::json uj1 = {{"version", 1}, {"type", "integer"}};
|
|
nlohmann::json uj2 = {{"type", "integer"}, {"version", 1}};
|
|
|
|
nlohmann::ordered_json oj1 = {{"version", 1}, {"type", "integer"}};
|
|
nlohmann::ordered_json oj2 = {{"type", "integer"}, {"version", 1}};
|
|
|
|
std::cout << std::boolalpha << (uj1 == uj2) << '\n' << (oj1 == oj2) << std::endl;
|
|
}
|
|
|