1#include <iostream> 2#include <nlohmann/json.hpp> 3 4using json = nlohmann::json; 5 6int main() 7{ 8 // create a JSON array 9 json j1 = {"one", "two", 3, 4.5, false}; 10 11 // create a copy 12 json j2(j1); 13 14 // serialize the JSON array 15 std::cout << j1 << " = " << j2 << '\n'; 16 std::cout << std::boolalpha << (j1 == j2) << '\n'; 17} 18