With very slight modification to json.hpp, it can support setting the fill char on the output stream to '\t', and then using this fill char as the indent char instead of space. It works well, for example:
nlohman::json jsonval(...);
std::ofstream ofs(path);
ofs << std::setfill('\t') << std::setw(1) << jsonval;
With very slight modification to json.hpp, it can support setting the fill char on the output stream to '\t', and then using this fill char as the indent char instead of space. It works well, for example:
nlohman::json jsonval(...);
std::ofstream ofs(path);
ofs << std::setfill('\t') << std::setw(1) << jsonval;