![]() |
NIM 跨平台 C++ SDK
|
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string. 更多...
#include <writer.h>
Public 成员函数 | |
| StyledStreamWriter (String indentation="\t") | |
| ~StyledStreamWriter ()=default | |
| void | write (OStream &out, const Value &root) |
| Serialize a Value in JSON format. | |
Private 类型 | |
| using | ChildValues = std::vector< String > |
Private 成员函数 | |
| void | writeValue (const Value &value) |
| void | writeArrayValue (const Value &value) |
| bool | isMultilineArray (const Value &value) |
| void | pushValue (const String &value) |
| void | writeIndent () |
| void | writeWithIndent (const String &value) |
| void | indent () |
| void | unindent () |
| void | writeCommentBeforeValue (const Value &root) |
| void | writeCommentAfterValueOnSameLine (const Value &root) |
静态 Private 成员函数 | |
| static bool | hasCommentForValue (const Value &value) |
| static String | normalizeEOL (const String &text) |
Private 属性 | |
| ChildValues | childValues_ |
| OStream * | document_ |
| String | indentString_ |
| unsigned int | rightMargin_ {74} |
| String | indentation_ |
| bool | addChildValues_: 1 |
| bool | indented_: 1 |
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.
|
private |
| nim_cpp_wrapper_util::Json::StyledStreamWriter::StyledStreamWriter | ( | String | indentation = "\t" | ) |
| indentation | Each level will be indented by this amount extra. |
|
default |
|
staticprivate |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |