I'm using the following code to test jsoncpp
#include <json/json.h>
#include <iostream>
using namespace std;
int main(int argc, char ** argv)
{
Json::Value root;
root["test"] = "中文测试123";
Json::StyledWriter styledWriter;
cout << styledWriter.write(root) << endl;
return 0;
}
And the output is like this
{
"test" : "中文测试123"
}
I'm wondering if jsoncpp can escape those unicode to \\uXXXX
?
I've tried both FastWriter and StyledWriter, non of them works