如何漂亮地打印 nlohmann::json json 文件? C++

时间:2021-07-18 14:56:40

标签: c++ std nlohmann-json

如何漂亮地打印我的 nlohmann::json json 文件?

我已经尝试过 o << std::setw(4) << data << std::endl; 就像一个旧的 stackoverflow 问题所说的那样,但我收到一条错误消息:

main.cpp:39:32: error: no member named 'setw' in namespace 'std'

o << std::setw(4) << data ...

非常感谢任何帮助!

0 个答案:

没有答案