|
xrpld
|
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string. More...
#include <json_writer.h>

Public Member Functions | |
| StyledStreamWriter (std::string indentation="\t") | |
| ~StyledStreamWriter ()=default | |
| void | write (std::ostream &out, Value const &root) |
| Serialize a Value in JSON format. | |
Private Types | |
| using | ChildValues = std::vector<std::string> |
Private Member Functions | |
| void | writeValue (Value const &value) |
| void | writeArrayValue (Value const &value) |
| bool | isMultilineArray (Value const &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_ {nullptr} |
| std::string | indentString_ |
| int | rightMargin_ {74} |
| 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 129 of file json_writer.h.
|
private |
Definition at line 163 of file json_writer.h.
| json::StyledStreamWriter::StyledStreamWriter | ( | std::string | indentation = "\t" | ) |
Definition at line 488 of file json_writer.cpp.
|
default |
| void json::StyledStreamWriter::write | ( | std::ostream & | out, |
| Value const & | root ) |
|
private |
Definition at line 505 of file json_writer.cpp.
|
private |
Definition at line 573 of file json_writer.cpp.
|
private |
Definition at line 636 of file json_writer.cpp.
|
private |
Definition at line 669 of file json_writer.cpp.
|
private |
Definition at line 682 of file json_writer.cpp.
|
private |
Definition at line 700 of file json_writer.cpp.
|
private |
Definition at line 707 of file json_writer.cpp.
|
private |
Definition at line 713 of file json_writer.cpp.
|
private |
Definition at line 165 of file json_writer.h.
|
private |
Definition at line 166 of file json_writer.h.
|
private |
Definition at line 167 of file json_writer.h.
|
private |
Definition at line 168 of file json_writer.h.
|
private |
Definition at line 169 of file json_writer.h.
|
private |
Definition at line 170 of file json_writer.h.