std::string writeString(Value const& root, StreamWriter::Factory const& builder) {
  std::ostringstream sout;
  StreamWriterPtr const sw(builder.newStreamWriter(&sout));
  sw->write(root);
  return sout.str();
}
Esempio n. 2
0
std::string writeString(StreamWriter::Factory const& builder, Value const& root) {
    std::ostringstream sout;
    StreamWriterPtr const writer(builder.newStreamWriter());
    writer->write(root, &sout);
    return sout.str();
}