nlohmann/json如何支持中文
组装json,值有中文就报错
#include "json.hpp"
#include <iostream>
#include <string>
using namespace std;
using json = nlohmann::json;
int main() {
{
json j;
j["name"] = "中文";
cout << j.dump(4) << endl;
}
return 0;
}