JsonCpp project page Classes Namespace JsonCpp home page

Json::CharReader Class Referenceabstract

Interface for reading JSON from a char array. More...

#include <json/reader.h>

+ Inheritance diagram for Json::CharReader:
+ Collaboration diagram for Json::CharReader:

Classes

class  Factory
 

Public Member Functions

virtual ~CharReader ()=default
 
virtual bool parse (char const *beginDoc, char const *endDoc, Value *root, String *errs)=0
 Read a Value from a JSON document.
 

Detailed Description

Interface for reading JSON from a char array.

Definition at line 244 of file reader.h.

Constructor & Destructor Documentation

◆ ~CharReader()

virtual Json::CharReader::~CharReader ( )
virtualdefault

Member Function Documentation

◆ parse()

virtual bool Json::CharReader::parse ( char const * beginDoc,
char const * endDoc,
Value * root,
String * errs )
pure virtual

Read a Value from a JSON document.

The document must be a UTF-8 encoded string containing the document to read.

Parameters
beginDocPointer on the beginning of the UTF-8 encoded string of the document to read.
endDocPointer on the end of the UTF-8 encoded string of the document to read. Must be >= beginDoc.
[out]rootContains the root value of the document if it was successfully parsed.
[out]errsFormatted error messages (if not NULL) a user friendly string that lists errors in the parsed document.
Returns
true if the document was successfully parsed, false if an error occurred.

Referenced by Json::parseFromStream().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: