![]() |
NIM 跨平台 C++ SDK
|
Writes a Value in JSON format in a human friendly way. 更多...
#include <writer.h>
Public 成员函数 | |
StyledWriter () | |
~StyledWriter () override=default | |
String | write (const Value &root) override |
Serialize a Value in JSON format. | |
![]() | |
virtual | ~Writer () |
virtual String | write (const Value &root)=0 |
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_ |
String | document_ |
String | indentString_ |
unsigned int | rightMargin_ {74} |
unsigned int | indentSize_ {3} |
bool | addChildValues_ {false} |
Writes a Value in JSON format in a human friendly way.
The rules for line break and indent are as follow:
If the Value have comments then they are outputed according to their CommentPlacement.
|
private |
|
default |
|
overridedefault |
|
staticprivate |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |