18 lines
381 B
C++
18 lines
381 B
C++
#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();
|
|
}
|