Build a CharReader implementation.
More...
#include <json.h>
Build a CharReader implementation.
Usage:
builder["collectComments"] = false;
std::string errs;
CharReader * Json::CharReaderBuilder::newCharReader |
( |
| ) |
const |
|
virtual |
virtual CharReader* Json::CharReaderBuilder::newCharReader |
( |
| ) |
const |
|
virtual |
Value& Json::CharReaderBuilder::operator[] |
( |
std::string |
key | ) |
|
A simple way to update a specific setting.
Value & Json::CharReaderBuilder::operator[] |
( |
std::string |
key | ) |
|
A simple way to update a specific setting.
static void Json::CharReaderBuilder::setDefaults |
( |
Json::Value * |
settings | ) |
|
|
static |
Called by ctor, but you can use this to reset settings_.
- Precondition
- 'settings' != NULL (but Json::null is fine)
void Json::CharReaderBuilder::setDefaults |
( |
Json::Value * |
settings | ) |
|
|
static |
Called by ctor, but you can use this to reset settings_.
- Precondition
- 'settings' != NULL (but Json::null is fine)
[CharReaderBuilderDefaults]
[CharReaderBuilderDefaults]
void Json::CharReaderBuilder::strictMode |
( |
Json::Value * |
settings | ) |
|
|
static |
Same as old Features::strictMode().
- Precondition
- 'settings' != NULL (but Json::null is fine)
[CharReaderBuilderStrictMode]
[CharReaderBuilderStrictMode]
static void Json::CharReaderBuilder::strictMode |
( |
Json::Value * |
settings | ) |
|
|
static |
bool Json::CharReaderBuilder::validate |
( |
Json::Value * |
invalid | ) |
const |
- Returns
- true if 'settings' are legal and consistent; otherwise, indicate bad settings via 'invalid'.
bool Json::CharReaderBuilder::validate |
( |
Json::Value * |
invalid | ) |
const |
- Returns
- true if 'settings' are legal and consistent; otherwise, indicate bad settings via 'invalid'.
Configuration of this builder. These are case-sensitive. Available settings (case-sensitive):
"collectComments": false or true
- true to collect comment and allow writing them back during serialization, false to discard comments. This parameter is ignored if allowComments is false.
"allowComments": false or true
- true if comments are allowed.
"strictRoot": false or true
- true if root must be either an array or an object value
"allowDroppedNullPlaceholders": false or true
"allowNumericKeys": false or true
- true if numeric object keys are allowed.
"allowSingleQuotes": false or true
- true if '' are allowed for strings (both keys and values)
"stackLimit": integer
- Exceeding stackLimit (recursive depth of
readValue()
) will cause an exception.
- This is a security issue (seg-faults caused by deeply nested JSON), so the default is low.
"failIfExtra": false or true
- If true,
parse()
returns false when extra non-whitespace trails the JSON value in the input string.
"rejectDupKeys": false or true
- If 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.
- See also
- setDefaults()
The documentation for this class was generated from the following files:
- /home/robin_f/Programming/Git/CPP/LoveBrains/include/json/json.h
- /home/robin_f/Programming/Git/CPP/LoveBrains/lib/GANNEngine/src/json/jsoncpp.cc