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 j_null;
00009 json j_boolean = true;
00010 json j_number_integer = 17;
00011 json j_number_float = 23.42;
00012 json j_number_unsigned_integer = 12345678987654321u;
00013 json j_object = {{"one", 1}, {"two", 2}};
00014 json j_array = {1, 2, 4, 8, 16};
00015 json j_string = "Hello, world";
00016
00017
00018 std::cout << std::boolalpha;
00019 std::cout << j_null.is_structured() << '\n';
00020 std::cout << j_boolean.is_structured() << '\n';
00021 std::cout << j_number_integer.is_structured() << '\n';
00022 std::cout << j_number_unsigned_integer.is_structured() << '\n';
00023 std::cout << j_number_float.is_structured() << '\n';
00024 std::cout << j_object.is_structured() << '\n';
00025 std::cout << j_array.is_structured() << '\n';
00026 std::cout << j_string.is_structured() << '\n';
00027 }