#include <p6jsonreader.h>
Inherits P6R::p6ICom.
Public Member Functions | |
virtual P6INT32 | addref (void)=0 |
virtual P6R::P6ERR | getContentHandler (p6IJSONContentHandler **pObject)=0 |
virtual P6R::P6ERR | getErrorHandler (p6IJSONErrorHandler **pObject)=0 |
virtual P6R::P6ERR | initialize (P6JSONFLAGS flags, P6UINT32 streamBufSize)=0 |
virtual P6R::P6ERR | queryInterface (const P6R::P6IID &iid, P6VOID **ppIface)=0 |
virtual P6INT32 | release (void)=0 |
virtual P6R::P6ERR | releaseAllHandlers (void)=0 |
virtual P6R::P6ERR | setContentHandler (p6IJSONContentHandler *pObject)=0 |
virtual P6R::P6ERR | setErrorHandler (p6IJSONErrorHandler *pObject)=0 |
This is the main JSON interface.
Notice that there is no separate parse function. That is because this component implements the P6R::p6IDataStream interface (see p6datastream.h). Thus this component supports the parsing of a stream of JSON data.
To parse either a single buffer or a stream of JSON buffers perform the following steps:
The input 'buffer' to the processStream() method is where the P6JSONSTRING pointers will often point to. The processStream() function can return an "eEndOfFile" error code to indicate that it is done with the buffer provided and that the buffer is incomplete (i.e., the JSON top most object has not yet been closed).
Close the stream down: err = pStream->endStream(); pStream->release();
Definition at line 76 of file p6jsonreader.h.