Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string. More...
#include <jsoncpp.h>
Public Member Functions | |
StyledStreamWriter (std::string indentation="\) | |
~StyledStreamWriter () | |
void | write (std::ostream &out, const Value &root) |
Serialize a Value in JSON format. More... | |
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. |
Json::StyledStreamWriter::StyledStreamWriter | ( | std::string | indentation = "\t" | ) |
Definition at line 3936 of file jsoncpp.cpp.
|
inline |
Definition at line 1793 of file jsoncpp.h.
References JSON_API, Json::operator<<(), Json::valueToQuotedString(), and Json::valueToString().
void Json::StyledStreamWriter::write | ( | std::ostream & | out, |
const Value & | root | ||
) |
Serialize a Value in JSON format.
out | Stream to write to. (Can be ostringstream, e.g.) |
root | Value to serialize. |
Definition at line 3945 of file jsoncpp.cpp.
References Json::arrayValue, Json::Value::asBool(), Json::Value::asCString(), Json::Value::asDouble(), Json::Value::asLargestInt(), Json::Value::asLargestUInt(), Json::booleanValue, Json::commentAfter, Json::commentAfterOnSameLine, Json::commentBefore, Json::Value::getComment(), Json::Value::getMemberNames(), Json::Value::hasComment(), Json::intValue, Json::Value::isArray(), Json::Value::isObject(), Json::nullValue, Json::objectValue, Json::realValue, Json::Value::size(), Json::stringValue, Json::Value::type(), Json::uintValue, Json::valueToQuotedString(), and Json::valueToString().
Referenced by Json::operator<<().