参考github问题:
https://github.com/nlohmann/json/issues/1475
std::ifstream in("/LearnJSON/test2.json");
json file = json::parse(in);
json j;
j = file;
j["unhappy"] = false;
std::ofstream out("/LearnJSON/test2.json");
j["pi"] = 3.14159;
out << std::setw(4) << j << std::endl;
float test = j["pi"];
std::cout << "New variable is: " << test << std::endl;