Build a CharReader implementation. More...
#include <json.h>
Public Member Functions | |
CharReaderBuilder () | |
virtual CharReader * | newCharReader () const |
Allocate a CharReader via operator new(). More... | |
Value & | operator[] (std::string key) |
bool | validate (Json::Value *invalid) const |
virtual | ~CharReaderBuilder () |
Public Member Functions inherited from Json::CharReader::Factory | |
virtual | ~Factory () |
Static Public Member Functions | |
static void | setDefaults (Json::Value *settings) |
static void | strictMode (Json::Value *settings) |
Public Attributes | |
Json::Value | settings_ |
Build a CharReader implementation.
Usage:
Json::CharReaderBuilder::CharReaderBuilder | ( | ) |
Definition at line 2074 of file jsoncpp.cpp.
|
virtual |
Definition at line 2078 of file jsoncpp.cpp.
|
virtual |
Allocate a CharReader via operator new().
std::exception | if something goes wrong (e.g. invalid settings) |
Implements Json::CharReader::Factory.
Definition at line 2080 of file jsoncpp.cpp.
Value & Json::CharReaderBuilder::operator[] | ( | std::string | key | ) |
A simple way to update a specific setting.
Definition at line 2124 of file jsoncpp.cpp.
|
static |
Called by ctor, but you can use this to reset settings_.
[CharReaderBuilderDefaults]
[CharReaderBuilderDefaults]
Definition at line 2142 of file jsoncpp.cpp.
|
static |
Same as old Features::strictMode().
[CharReaderBuilderStrictMode]
[CharReaderBuilderStrictMode]
Definition at line 2129 of file jsoncpp.cpp.
bool Json::CharReaderBuilder::validate | ( | Json::Value * | invalid | ) | const |
Definition at line 2107 of file jsoncpp.cpp.
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
"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.You can examine 'settings_` yourself to see the defaults. You can also write and read them just like any JSON Value.