Nlohmann Json, escribiendo en el archivo JSON

std::ofstream o("test.json");
o << std::setw(4) << j << std::endl;
Maou Shimazu