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 (String indentation="\t") | |
~StyledStreamWriter ()=default | |
void | write (OStream &out, const Value &root) |
Serialize a Value in JSON format. | |
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 outputted according to their CommentPlacement.
Json::StyledStreamWriter::StyledStreamWriter | ( | String | indentation = "\t" | ) |
indentation | Each level will be indented by this amount extra. |
Definition at line 654 of file json_writer.cpp.
|
default |
References write().
Serialize a Value in JSON format.
out | Stream to write to. (Can be ostringstream, e.g.) |
root | Value to serialize. |
Definition at line 658 of file json_writer.cpp.
Referenced by ~StyledStreamWriter().