00001 #include <json.hpp> 00002 00003 using json = nlohmann::json; 00004 00005 int main() 00006 { 00007 // create a JSON array 00008 json j1 = {"one", "two", 3, 4.5, false}; 00009 00010 // create a copy 00011 json j2(j1); 00012 00013 // serialize the JSON array 00014 std::cout << j1 << " = " << j2 << '\n'; 00015 std::cout << std::boolalpha << (j1 == j2) << '\n'; 00016 }