1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-06 06:42:33 +03:00

reorganized repo

This commit is contained in:
Niels
2015-06-21 21:24:03 +02:00
parent 4bb5126502
commit 91c330ae01
88 changed files with 313 additions and 321 deletions

View File

@ -0,0 +1,20 @@
#include <json.hpp>
using namespace nlohmann;
int main()
{
// create JSON values
json j_empty_init_list = json({});
json j_object = { {"one", 1}, {"two", 2} };
json j_array = {1, 2, 3, 4};
json j_nested_object = { {"one", {1}}, {"two", {1, 2}} };
json j_nested_array = { {{1}, "one"}, {{1, 2}, "two"} };
// serialize the JSON value
std::cout << j_empty_init_list << '\n';
std::cout << j_object << '\n';
std::cout << j_array << '\n';
std::cout << j_nested_object << '\n';
std::cout << j_nested_array << '\n';
}