Rapidjson: Pretty print to a string

Created on 12 Nov 2015  路  1Comment  路  Source: Tencent/rapidjson

Feature request - pretty print a json to a string stream. Something like this:

std::ostringstream oss;
rapidjson::PrettyWriter(oss);
doc.Accept(oss);

enhancement

Most helpful comment

You can done it since #530

#include "rapidjson/ostreamwrapper.h"

std::ostringstream oss;
rapidjson::OStreamWrapper osw(oss);
rapidjson::PrettyWriter writer(osw);
doc.Accept(writer);

>All comments

You can done it since #530

#include "rapidjson/ostreamwrapper.h"

std::ostringstream oss;
rapidjson::OStreamWrapper osw(oss);
rapidjson::PrettyWriter writer(osw);
doc.Accept(writer);
Was this page helpful?
0 / 5 - 0 ratings

Related issues

leeyiw picture leeyiw  路  4Comments

dan-ryan picture dan-ryan  路  6Comments

ns-osmolsky picture ns-osmolsky  路  4Comments

vzaluckis picture vzaluckis  路  4Comments

oneonce picture oneonce  路  3Comments