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 array = {1, 2, 3};
00009 json object = {{"A", "a"}, {"B", "b"}};
00010 json number = 17;
00011 json string = "foo";
00012 json null;
00013
00014
00015 std::cout << std::boolalpha;
00016 std::cout << array << " != nullptr " << (array != nullptr) << '\n';
00017 std::cout << object << " != nullptr " << (object != nullptr) << '\n';
00018 std::cout << number << " != nullptr " << (number != nullptr) << '\n';
00019 std::cout << string << " != nullptr " << (string != nullptr) << '\n';
00020 std::cout << null << " != nullptr " << (null != nullptr) << '\n';
00021 }