// g++ test_json.cpp -o test_json -I json/include/ #include <stdio.h> #include <string.h> #include <nlohmann/json.hpp> #include <iostream> int main(int argc, char **argv){ using json = nlohmann::json; json j; j["pi"] = 3.141; j["happy"] = true; j["name"] = "Niels"; j["nothing"] = nullptr; j["answer"]["everything"] = 42; j["list"] = { 1, 0, 2 }; // [1,0,2] j["object"] = { {"currency", "USD"}, {"val