1 #include <iostream> 2 #include <nlohmann/json.hpp> 3 4 using json = nlohmann::json; 5 main()6int main() 7 { 8 // create JSON values 9 json array = {1, 2, 3, 4, 5}; 10 json null; 11 12 // print values 13 std::cout << array << '\n'; 14 std::cout << null << '\n'; 15 16 // add values 17 array.push_back(6); 18 array += 7; 19 null += "first"; 20 null += "second"; 21 22 // print values 23 std::cout << array << '\n'; 24 std::cout << null << '\n'; 25 } 26