Documentation
Classes |
Public Types |
Public Member Functions |
Private Member Functions |
Private Attributes |
Static Private Attributes |
List of all members
rapidjson::GenericReader< SourceEncoding, TargetEncoding, Allocator > Class Template Reference
SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator. More...
#include <reader.h>
Collaboration diagram for rapidjson::GenericReader< SourceEncoding, TargetEncoding, Allocator >:
Classes | |
class | StackStream |
Public Types | |
typedef SourceEncoding::Ch | Ch |
Public Member Functions | |
GenericReader (Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity) | |
Constructor. More... | |
template<unsigned parseFlags, typename InputStream , typename Handler > | |
bool | Parse (InputStream &is, Handler &handler) |
Parse JSON text. More... | |
bool | HasParseError () const |
const char * | GetParseError () const |
size_t | GetErrorOffset () const |
Private Member Functions | |
template<unsigned parseFlags, typename InputStream , typename Handler > | |
void | ParseObject (InputStream &is, Handler &handler) |
template<unsigned parseFlags, typename InputStream , typename Handler > | |
void | ParseArray (InputStream &is, Handler &handler) |
template<unsigned parseFlags, typename InputStream , typename Handler > | |
void | ParseNull (InputStream &is, Handler &handler) |
template<unsigned parseFlags, typename InputStream , typename Handler > | |
void | ParseTrue (InputStream &is, Handler &handler) |
template<unsigned parseFlags, typename InputStream , typename Handler > | |
void | ParseFalse (InputStream &is, Handler &handler) |
template<typename InputStream > | |
unsigned | ParseHex4 (InputStream &is) |
template<unsigned parseFlags, typename InputStream , typename Handler > | |
void | ParseString (InputStream &is, Handler &handler) |
template<unsigned parseFlags, typename SEncoding , typename TEncoding , typename InputStream , typename OutputStream > | |
RAPIDJSON_FORCEINLINE void | ParseStringToStream (InputStream &is, OutputStream &os) |
template<unsigned parseFlags, typename InputStream , typename Handler > | |
void | ParseNumber (InputStream &is, Handler &handler) |
template<unsigned parseFlags, typename InputStream , typename Handler > | |
void | ParseValue (InputStream &is, Handler &handler) |
Private Attributes | |
internal::Stack< Allocator > | stack_ |
A stack for storing decoded string temporarily during non-destructive parsing. | |
jmp_buf | jmpbuf_ |
setjmp buffer for fast exit from nested parsing function calls. | |
const char * | parseError_ |
size_t | errorOffset_ |
Static Private Attributes | |
static const size_t | kDefaultStackCapacity = 256 |
Default stack capacity in bytes for storing a single decoded string. | |
Detailed Description
template<typename SourceEncoding, typename TargetEncoding, typename Allocator = MemoryPoolAllocator<>>
class rapidjson::GenericReader< SourceEncoding, TargetEncoding, Allocator >
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.
Constructor & Destructor Documentation
template<typename SourceEncoding, typename TargetEncoding, typename Allocator = MemoryPoolAllocator<>>
|
inline |
Constructor.
- Parameters
-
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)
Member Function Documentation
template<typename SourceEncoding, typename TargetEncoding, typename Allocator = MemoryPoolAllocator<>>
template<unsigned parseFlags, typename InputStream , typename Handler >
|
inline |
The documentation for this class was generated from the following file:
- /home/travis/build/urho3d/Urho3D/Source/ThirdParty/rapidjson/include/rapidjson/reader.h