json test

Embed: (wiki syntax)

« Back to documentation index

CharReader Class Reference

CharReader Class Reference

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

#include <reader.h>

Inherited by OurCharReader.

Public Member Functions

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

Detailed Description

Interface for reading JSON from a char array.

Definition at line 252 of file reader.h.


Member Function Documentation

virtual bool parse ( char const *  beginDoc,
char const *  endDoc,
Value root,
JSONCPP_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.
root[out] Contains the root value of the document if it was successfully parsed.
errs[out] Formatted 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.