Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
P6R::p6IJSONContentHandler Interface Referenceabstract

#include <p6jsoncontenthandler.h>

Inherits P6R::p6ICom.

Public Member Functions

virtual P6INT32 addref (void)=0
 
virtual P6R::P6ERR endArray (P6UINT32 nestingLevel)=0
 
virtual P6R::P6ERR endDocument (void)=0
 
virtual P6R::P6ERR endObject (P6UINT32 nestingLevel)=0
 
virtual P6R::P6ERR queryInterface (const P6R::P6IID &iid, P6VOID **ppIface)=0
 
virtual P6INT32 release (void)=0
 
virtual P6R::P6ERR setDocumentLocator (p6IJSONLocator *pObject)=0
 
virtual P6R::P6ERR startArray (P6UINT32 nestingLevel)=0
 
virtual P6R::P6ERR startDocument (void)=0
 
virtual P6R::P6ERR startObject (P6UINT32 nestingLevel)=0
 
virtual P6R::P6ERR startPair (P6JSONSTRING *pName)=0
 
virtual P6R::P6ERR value (P6JSONVALUE *pValue)=0
 

Detailed Description

This interface is implemented by an application to handle the parsing events that are generated by the JSON parser.

This is a callback object that is registered using the P6R::p6IJSONReader::setContentHandler() method and is the main parsing interface to the application. It provides a stream of events for each item in the input JSON document. Each event results in a method call to one of the methods below.

* Given the simple JSON document:
* { "menuitem": "File",
* "offsets": [ 44, 99 ]
* }
*
* The following sequence of callbacks would happen in the application written instance of
* the P6IJSONContentHandler interface:
*
* startObject( 1 ) - {
* startPair() - menuitem
* value() - File (P6JSON_TYPE_STR)
* startPair() - offsets (P6JSON_TYPE_STR)
* startArray( 1 ) - [
* endArray( 1 ) - ]
* endObject( 1 ) - }
*

Definition at line 60 of file p6jsoncontenthandler.h.


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