mirror of
https://github.com/nlohmann/json.git
synced 2024-08-23 13:32:28 +02:00
15 lines
224 B
C++
15 lines
224 B
C++
|
#include <iostream>
|
||
|
#include <nlohmann/json.hpp>
|
||
|
|
||
|
using ordered_json = nlohmann::ordered_json;
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
ordered_json j;
|
||
|
j["one"] = 1;
|
||
|
j["two"] = 2;
|
||
|
j["three"] = 3;
|
||
|
|
||
|
std::cout << j.dump(2) << '\n';
|
||
|
}
|