#include "value.h"
#include <ostream>
#include <string>
#include <vector>
Go to the source code of this file.
|
| cause an exception This is a security so the default is low | failIfExtra |
| |
◆ JSON_WRITER_H_INCLUDED
| #define JSON_WRITER_H_INCLUDED |
◆ CharReaderBuilder()
| cause an exception This is a security so the default is low parse ()` returns false when extra non-whitespace trails the JSON value in the input string. - `"rejectDupKeys" CharReaderBuilder |
( |
| ) |
|
◆ issue()
| cause an exception This is a security issue |
( |
seg-faults caused by deeply nested |
JSON | ) |
|
◆ newCharReader()
| virtual CharReader* newCharReader |
( |
| ) |
const |
|
virtual |
◆ operator>>()
| JSON_API std::istream& operator>> |
( |
std::istream & |
, |
|
|
Value & |
|
|
) |
| |
Read from 'sin' into 'root'.
Always keep comments from the input JSON.
This can be used to read a file into a particular sub-object. For example:
cin >> root["dir"]["file"];
cout << root;
Result:
{
"dir": {
"file": {
// The input stream JSON would be nested here.
}
}
}
- Exceptions
-
| std::exception | on parse error. |
- See also
- Json::operator<<()
◆ operator[]()
| Value& operator[] |
( |
std::string |
key | ) |
|
A simple way to update a specific setting.
◆ parseFromStream()
| bool JSON_API parseFromStream |
( |
CharReader::Factory const & |
, |
|
|
std::istream & |
, |
|
|
Value * |
root, |
|
|
std::string * |
errs |
|
) |
| |
Consume entire stream and use its begin/end. Someday we might have a real StreamReader, but for now this is convenient.
◆ setDefaults()
Called by ctor, but you can use this to reset settings_.
- Precondition
- 'settings' != NULL (but Json::null is fine)
◆ strictMode()
Same as old Features::strictMode().
- Precondition
- 'settings' != NULL (but Json::null is fine)
◆ validate()
- Returns
- true if 'settings' are legal and consistent; otherwise, indicate bad settings via 'invalid'.
◆ ~CharReaderBuilder()
◆ failIfExtra
| cause an exception This is a security so the default is low failIfExtra |