Writes a Value in JSON format in a human friendly way, to a stream rather than to a string. More...
#include <json.h>
Public Member Functions | |
StyledStreamWriter (std::string indentation="\t") | |
void | write (std::ostream &out, const Value &root) |
Serialize a Value in JSON format. More... | |
~StyledStreamWriter () | |
Private Types | |
typedef std::vector< std::string > | ChildValues |
Private Member Functions | |
bool | hasCommentForValue (const Value &value) |
void | indent () |
bool | isMultineArray (const Value &value) |
void | pushValue (const std::string &value) |
void | unindent () |
void | writeArrayValue (const Value &value) |
void | writeCommentAfterValueOnSameLine (const Value &root) |
void | writeCommentBeforeValue (const Value &root) |
void | writeIndent () |
void | writeValue (const Value &value) |
void | writeWithIndent (const std::string &value) |
Static Private Member Functions | |
static std::string | normalizeEOL (const std::string &text) |
Private Attributes | |
bool | addChildValues_: 1 |
ChildValues | childValues_ |
std::ostream * | document_ |
std::string | indentation_ |
bool | indented_: 1 |
std::string | indentString_ |
int | rightMargin_ |
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:
If the Value have comments then they are outputed according to their CommentPlacement.
indentation | Each level will be indented by this amount extra. |
|
private |
Json::StyledStreamWriter::StyledStreamWriter | ( | std::string | indentation = "\t" | ) |
Definition at line 4517 of file jsoncpp.cpp.
|
private |
Definition at line 4724 of file jsoncpp.cpp.
|
private |
Definition at line 4688 of file jsoncpp.cpp.
|
private |
Definition at line 4639 of file jsoncpp.cpp.
|
staticprivate |
|
private |
Definition at line 4667 of file jsoncpp.cpp.
|
private |
Definition at line 4690 of file jsoncpp.cpp.
void Json::StyledStreamWriter::write | ( | std::ostream & | out, |
const Value & | root | ||
) |
|
private |
Definition at line 4594 of file jsoncpp.cpp.
|
private |
Definition at line 4713 of file jsoncpp.cpp.
|
private |
Definition at line 4695 of file jsoncpp.cpp.
|
private |
Definition at line 4674 of file jsoncpp.cpp.
|
private |
Definition at line 4535 of file jsoncpp.cpp.
|
private |
Definition at line 4682 of file jsoncpp.cpp.
|
private |