SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator. More...
#include <reader.h>
Public Types | |
| typedef Encoding::Ch | Ch |
Public Member Functions | |
| GenericReader (Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity) | |
| Constructor. More... | |
| template<unsigned parseFlags, typename Stream , typename Handler > | |
| bool | Parse (Stream &stream, Handler &handler) |
| Parse JSON text. More... | |
| template<unsigned parseFlags, typename Stream , typename Handler > | |
| local | Parse ( local stream, local handler) |
| Parse JSON text. More... | |
| bool | HasParseError () const |
| const char * | GetParseError () const |
| var | GetParseError () |
| local | GetParseError () |
| size_t | GetErrorOffset () const |
SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator.
GenericReader parses JSON text from a stream, and send events synchronously to an object implementing Handler concept.
It needs to allocate a stack for storing a single decoded string during non-destructive parsing.
For in-situ parsing, the decoded string is directly written to the source text string, no temporary buffer is required.
A GenericReader object can be reused for parsing multiple JSON text.
| typedef Encoding::Ch Ch |
| var Ch |
| local Ch |
|
inline |
Constructor.
| allocator | Optional allocator for allocating stack memory. (Only use for non-destructive parsing) |
| stackCapacity | stack capacity in bytes for storing a single decoded string. (Only use for non-destructive parsing) |
|
inline |
Constructor.
| allocator | Optional allocator for allocating stack memory. (Only use for non-destructive parsing) |
| stackCapacity | stack capacity in bytes for storing a single decoded string. (Only use for non-destructive parsing) |
|
inline |
Constructor.
| allocator | Optional allocator for allocating stack memory. (Only use for non-destructive parsing) |
| stackCapacity | stack capacity in bytes for storing a single decoded string. (Only use for non-destructive parsing) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |