1 #include <iostream> 2 #include <nlohmann/json.hpp> 3 4 using ordered_json = nlohmann::ordered_json; 5 main()6 int main() 7 { 8 ordered_json j; 9 j["one"] = 1; 10 j["two"] = 2; 11 j["three"] = 3; 12 13 std::cout << j.dump(2) << '\n'; 14 } 15