rippled
|
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string. More...
Public Member Functions | |
StyledStreamWriter (std::string indentation="\t") | |
~StyledStreamWriter () | |
void | write (std::ostream &out, const Value &root) |
Serialize a Value in JSON format. More... | |
Private Types | |
using | ChildValues = std::vector< std::string > |
Private Member Functions | |
void | writeValue (const Value &value) |
void | writeArrayValue (const Value &value) |
bool | isMultineArray (const Value &value) |
void | pushValue (std::string const &value) |
void | writeIndent () |
void | writeWithIndent (std::string const &value) |
void | indent () |
void | unindent () |
Private Attributes | |
ChildValues | childValues_ |
std::ostream * | document_ |
std::string | indentString_ |
int | rightMargin_ |
std::string | indentation_ |
bool | addChildValues_ |
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string.
The rules for line break and indent are as follow:
indentation | Each level will be indented by this amount extra. |
Definition at line 154 of file json_writer.h.
|
private |
Definition at line 190 of file json_writer.h.
Json::StyledStreamWriter::StyledStreamWriter | ( | std::string | indentation = "\t" | ) |
Definition at line 493 of file json_writer.cpp.
Json::StyledStreamWriter::~StyledStreamWriter | ( | ) |
Definition at line 158 of file json_writer.h.
void Json::StyledStreamWriter::write | ( | std::ostream & | out, |
const Value & | root | ||
) |
|
private |
Definition at line 510 of file json_writer.cpp.
|
private |
Definition at line 576 of file json_writer.cpp.
|
private |
Definition at line 633 of file json_writer.cpp.
|
private |
Definition at line 667 of file json_writer.cpp.
|
private |
Definition at line 676 of file json_writer.cpp.
|
private |
Definition at line 694 of file json_writer.cpp.
|
private |
Definition at line 701 of file json_writer.cpp.
|
private |
Definition at line 707 of file json_writer.cpp.
|
private |
Definition at line 192 of file json_writer.h.
|
private |
Definition at line 193 of file json_writer.h.
|
private |
Definition at line 194 of file json_writer.h.
|
private |
Definition at line 195 of file json_writer.h.
|
private |
Definition at line 196 of file json_writer.h.
|
private |
Definition at line 197 of file json_writer.h.