|
|
Home | Loader API | Interfaces | File List | Index | |
This JSON interface is implemented by an application using P6R's JSON parser. More...
#include <p6jsoncontenthandler.h>
Inherits P6R::p6ICom.
Public Member Functions | |
virtual P6R::P6INT32 | addref ()=0 |
This method increases the reference count of the component instance by one. | |
virtual P6R::P6ERR | endArray (P6UINT32 nestingLevel)=0 |
Provides an application the notification when the most recent array (as defined by a callback of the startArray method below) has ended. | |
virtual P6R::P6ERR | endDocument ()=0 |
Provides an application the notification when the end of the JSON input document has been reached by the parser. | |
virtual P6R::P6ERR | endObject (P6UINT32 nestingLevel)=0 |
Provides an application the notification when the most recent object (as defined by a callback of the startObject method below) has ended. | |
virtual P6R::P6ERR | queryInterface (const P6R::IID &iid, P6R::P6VOID **ppIface)=0 |
This method queries the component for a specific interface. | |
virtual P6R::P6INT32 | release ()=0 |
This method decrements a components reference count. | |
virtual P6R::P6ERR | setDocumentLocator (p6IJSONLocator *pObject)=0 |
This method is called just before the startDocument() method and the application is given a p6IJSONLocator component created by the JSON parser. | |
virtual P6R::P6ERR | startArray (P6UINT32 nestingLevel)=0 |
Provides an application the notification when a new JSON array has been detected. | |
virtual P6R::P6ERR | startDocument ()=0 |
Provides an application the notification when the start of the JSON input document has been reached by the parser. | |
virtual P6R::P6ERR | startObject (P6UINT32 nestingLevel)=0 |
Provides an application the notification when a new JSON object has been detected. | |
virtual P6R::P6ERR | startPair (P6JSONSTRING *pName)=0 |
A JSON object consists of an unordered set of name/value pairs. | |
virtual P6R::P6ERR | value (P6JSONVALUE *pValue)=0 |
Both JSON objects and arrays contain values which can be strings, boolean values, numeric values, nested objects, nested arrays, and the value "null". |
This JSON interface is implemented by an application using P6R's JSON parser.
This is a callback object that is registered with the P6R::p6IJSONReader::setContentHandler() method. This 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: startDocument() startObject( 1 ) - { startPair() - menuitem value() - File (P6JSON_TYPE_STR) startPair() - offsets (P6JSON_TYPE_STR) startArray( 1 ) - [ value() - 44 (P6JSON_TYPE_INTEGER) value() - 99 (P6JSON_TYPE_INTEGER) endArray( 1 ) - ] endObject( 1 ) - } endDocument()
Definition at line 57 of file p6jsoncontenthandler.h.