Interface for reading JSON from a char array. More...
#include <json/reader.h>
Classes | |
class | Factory |
class | Impl |
struct | StructuredError |
Public Member Functions | |
virtual | ~CharReader ()=default |
virtual bool | parse (char const *beginDoc, char const *endDoc, Value *root, String *errs) |
Read a Value from a JSON document. | |
std::vector< StructuredError > | getStructuredErrors () const |
Returns a vector of structured errors encountered while parsing. |
Protected Member Functions | |
CharReader (std::unique_ptr< Impl > impl) |
|
virtualdefault |
References getStructuredErrors(), and parse().
|
inlineexplicitprotected |
Definition at line 296 of file reader.h.
Referenced by Json::CharReader::Factory::newCharReader().
std::vector< CharReader::StructuredError > Json::CharReader::getStructuredErrors | ( | ) | const |
Returns a vector of structured errors encountered while parsing.
Each parse call resets the stored list of errors.
Definition at line 1982 of file json_reader.cpp.
Referenced by ~CharReader().
|
virtual |
Read a Value from a JSON document.
The document must be a UTF-8 encoded string containing the document to read.
beginDoc | Pointer on the beginning of the UTF-8 encoded string of the document to read. | |
endDoc | Pointer on the end of the UTF-8 encoded string of the document to read. Must be >= beginDoc. | |
[out] | root | Contains the root value of the document if it was successfully parsed. |
[out] | errs | Formatted error messages (if not NULL) a user friendly string that lists errors in the parsed document. |
true
if the document was successfully parsed, false
if an error occurred. Definition at line 1986 of file json_reader.cpp.
Referenced by Json::parseFromStream(), and ~CharReader().