Go to the documentation of this file.00001 #include <json.hpp>
00002
00003 using json = nlohmann::json;
00004
00005 int main()
00006 {
00007
00008 json object = {{"one", 1}, {"two", 2}};
00009 json null;
00010
00011
00012 std::cout << object << '\n';
00013 std::cout << null << '\n';
00014
00015
00016 object.push_back(json::object_t::value_type("three", 3));
00017 object += json::object_t::value_type("four", 4);
00018 null += json::object_t::value_type("A", "a");
00019 null += json::object_t::value_type("B", "b");
00020
00021
00022 std::cout << object << '\n';
00023 std::cout << null << '\n';
00024 }