添加项目文件。
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#include "JsonUnicodeWriter.h"
|
||||
|
||||
JsonUnicodeWriter::JsonUnicodeWriter()
|
||||
{
|
||||
jswb["emitUTF8"] = true;
|
||||
jswb["indentation"] = "";
|
||||
jswb["precisionType"] = "decimal";
|
||||
jswb["commentStyle"] = "None";
|
||||
}
|
||||
|
||||
string JsonUnicodeWriter::write(Json::Value root)
|
||||
{
|
||||
unique_ptr<Json::StreamWriter>writer(jswb.newStreamWriter());
|
||||
ostringstream oss;
|
||||
writer->write(root, &oss);
|
||||
return oss.str();
|
||||
}
|
||||
Reference in New Issue
Block a user