Build a CharReader implementation. More...
#include <json/reader.h>
Inherits Json::CharReader::Factory.
Public Member Functions | |
CharReaderBuilder () | |
~CharReaderBuilder () override | |
CharReader * | newCharReader () const override |
Allocate a CharReader via operator new(). More... | |
bool | validate (Json::Value *invalid) const |
Value & | operator[] (const String &key) |
A simple way to update a specific setting. More... | |
Public Member Functions inherited from Json::CharReader::Factory | |
virtual | ~Factory ()=default |
Static Public Member Functions | |
static void | setDefaults (Json::Value *settings) |
Called by ctor, but you can use this to reset settings_. More... | |
static void | strictMode (Json::Value *settings) |
Same as old Features::strictMode(). More... | |
Public Attributes | |
Json::Value | settings_ |
Configuration of this builder. More... | |
Build a CharReader implementation.
Usage:
Json::CharReaderBuilder::CharReaderBuilder | ( | ) |
|
overridedefault |
|
overridevirtual |
Allocate a CharReader via operator new().
std::exception | if something goes wrong (e.g. invalid settings) |
Implements Json::CharReader::Factory.
A simple way to update a specific setting.
|
static |
Called by ctor, but you can use this to reset settings_.
[CharReaderBuilderDefaults]
[CharReaderBuilderDefaults]
|
static |
Same as old Features::strictMode().
[CharReaderBuilderStrictMode]
[CharReaderBuilderStrictMode]
bool Json::CharReaderBuilder::validate | ( | Json::Value * | invalid | ) | const |
Json::Value Json::CharReaderBuilder::settings_ |
Configuration of this builder.
These are case-sensitive. Available settings (case-sensitive):
"collectComments": false or true
"allowComments": false or true
"allowTrailingCommas": false or true
"strictRoot": false or true
"allowDroppedNullPlaceholders": false or true
"allowNumericKeys": false or true
"allowSingleQuotes": false or true
"stackLimit": integer
readValue()
) will cause an exception."failIfExtra": false or true
parse()
returns false when extra non-whitespace trails the JSON value in the input string."rejectDupKeys": false or true
parse()
returns false when a key is duplicated within an object."allowSpecialFloats": false or true
You can examine 'settings_` yourself to see the defaults. You can also write and read them just like any JSON Value.