Build a StreamWriter implementation. More...
#include <json/writer.h>
Inheritance diagram for Json::StreamWriterBuilder:
Collaboration diagram for Json::StreamWriterBuilder:Public Member Functions | |
| StreamWriterBuilder () | |
| ~StreamWriterBuilder () override | |
| StreamWriter * | newStreamWriter () const override |
| bool | validate (Json::Value *invalid) const |
| Value & | operator[] (const String &key) |
| A simple way to update a specific setting. | |
Public Member Functions inherited from Json::StreamWriter::Factory | |
| virtual | ~Factory () |
Static Public Member Functions | |
| static void | setDefaults (Json::Value *settings) |
| Called by ctor, but you can use this to reset settings_. | |
Public Attributes | |
| Json::Value | settings_ |
| Configuration of this builder. | |
Build a StreamWriter implementation.
Usage:
| Json::StreamWriterBuilder::StreamWriterBuilder | ( | ) |
Definition at line 1165 of file json_writer.cpp.
References setDefaults(), and settings_.
|
overridedefault |
|
overridevirtual |
| std::exception | if something goes wrong (e.g. invalid settings) |
Implements Json::StreamWriter::Factory.
Definition at line 1167 of file json_writer.cpp.
References Json::Value::asBool(), Json::Value::asString(), Json::Value::asUInt(), Json::decimalPlaces, settings_, and Json::significantDigits.
Referenced by Json::operator<<().
Here is the caller graph for this function:A simple way to update a specific setting.
Definition at line 1233 of file json_writer.cpp.
References settings_.
|
static |
Called by ctor, but you can use this to reset settings_.
[StreamWriterBuilderDefaults]
[StreamWriterBuilderDefaults]
Definition at line 1237 of file json_writer.cpp.
Referenced by StreamWriterBuilder().
Here is the caller graph for this function:| bool Json::StreamWriterBuilder::validate | ( | Json::Value * | invalid | ) | const |
Definition at line 1210 of file json_writer.cpp.
References Json::Value::begin(), Json::Value::empty(), Json::Value::end(), and settings_.
| Json::Value Json::StreamWriterBuilder::settings_ |
Configuration of this builder.
Available settings (case-sensitive):
You can examine 'settings_` yourself to see the defaults. You can also write and read them just like any JSON Value.
Definition at line 122 of file writer.h.
Referenced by newStreamWriter(), operator[](), StreamWriterBuilder(), and validate().
1.12.0