using namespace Json; CharReaderBuilder builder; builder.settings_["collectComments"] = false; Value value; std::string errs; bool ok = parseFromStream(builder, std::cin, &value, &errs);
Build a CharReader implementation.
using namespace Json; CharReaderBuilder builder; builder.settings_["collectComments"] = false; Value value; std::string errs; bool ok = parseFromStream(builder, std::cin, &value, &errs);
Public Member Functions | |
CharReaderBuilder () | |
virtual | ~CharReaderBuilder () |
virtual CharReader * | newCharReader () const |
bool | validate (Json::Value *invalid) const |
| |
CharReaderBuilder () | |
virtual | ~CharReaderBuilder () |
virtual CharReader * | newCharReader () const |
bool | validate (Json::Value *invalid) const |
| |
Static Public Member Functions | |
static void | setDefaults (Json::Value *settings) |
Called by ctor, but you can use this to reset settings_. | |
static void | strictMode (Json::Value *settings) |
Same as old Features::strictMode(). | |
static void | setDefaults (Json::Value *settings) |
Called by ctor, but you can use this to reset settings_. | |
static void | strictMode (Json::Value *settings) |
Same as old Features::strictMode(). | |
Public Attributes | |
Json::Value | settings_ |
Configuration of this builder. |
~CharReaderBuilder | ( | ) | [virtual] |
virtual ~CharReaderBuilder | ( | ) | [virtual] |
CharReader * newCharReader | ( | ) | const [virtual] |
Allocate a CharReader via operator new().
std::exception | if something goes wrong (e.g. invalid settings) |
Implements CharReader::Factory.
bool validate | ( | Json::Value * | invalid | ) | const |
void setDefaults | ( | Json::Value * | settings | ) | [static] |
Called by ctor, but you can use this to reset settings_.
[CharReaderBuilderDefaults]
[CharReaderBuilderDefaults]
void strictMode | ( | Json::Value * | settings | ) | [static] |
Same as old Features::strictMode().
[CharReaderBuilderStrictMode]
[CharReaderBuilderStrictMode]
virtual CharReader* newCharReader | ( | ) | const [virtual] |
Allocate a CharReader via operator new().
std::exception | if something goes wrong (e.g. invalid settings) |
Implements CharReader::Factory.
bool validate | ( | Json::Value * | invalid | ) | const |
static void setDefaults | ( | Json::Value * | settings | ) | [static] |
Called by ctor, but you can use this to reset settings_.
static void strictMode | ( | Json::Value * | settings | ) | [static] |
Same as old Features::strictMode().
Configuration of this builder.
These are case-sensitive. 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.