Rudiments
Public Member Functions | Protected Member Functions | List of all members
jsonsax Class Reference

#include <jsonsax.h>

Inherits sax.

Inherited by jsondom.

Public Member Functions

 jsonsax ()
 
virtual ~jsonsax ()
 
- Public Member Functions inherited from sax
 sax ()
 
virtual ~sax ()
 
void setIgnoreHeaderLines (uint64_t lines)
 
uint64_t getIgnoreHeaderLines ()
 
void setIgnoreFooterLines (uint64_t lines)
 
uint64_t getIgnoreFooterLines ()
 
virtual bool parse (input *in)
 
virtual bool parseFile (const char *filename)
 
virtual bool parseString (const char *string)
 
const chargetError ()
 
- Public Member Functions inherited from object
virtual ~object ()
 

Protected Member Functions

virtual bool objectStart ()
 
virtual bool memberStart ()
 
virtual bool memberName (const char *name)
 
virtual bool valueStart ()
 
virtual bool stringValue (const char *value)
 
virtual bool numberValue (const char *value)
 
virtual bool trueValue ()
 
virtual bool falseValue ()
 
virtual bool nullValue ()
 
virtual bool arrayStart ()
 
virtual bool arrayEnd ()
 
virtual bool valueEnd ()
 
virtual bool memberEnd ()
 
virtual bool objectEnd ()
 

Detailed Description

The jsonsax class is a base class for an SAX-style parser for JSON data. To use this class, you should create a class that inherits from it and implements its protected virtual methods.

Constructor & Destructor Documentation

◆ jsonsax()

jsonsax::jsonsax ( )

Creates an instance of the jsonsax class.

◆ ~jsonsax()

virtual jsonsax::~jsonsax ( )
virtual

Deletes this instance of the jsonsax class.

Member Function Documentation

◆ arrayEnd()

virtual bool jsonsax::arrayEnd ( )
protectedvirtual

Gets called when an array end is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ arrayStart()

virtual bool jsonsax::arrayStart ( )
protectedvirtual

Gets called when an array start is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ falseValue()

virtual bool jsonsax::falseValue ( )
protectedvirtual

Gets called when a false value is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ memberEnd()

virtual bool jsonsax::memberEnd ( )
protectedvirtual

Gets called when a member end is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ memberName()

virtual bool jsonsax::memberName ( const char * name)
protectedvirtual

Gets called when a member name is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ memberStart()

virtual bool jsonsax::memberStart ( )
protectedvirtual

Gets called when a member start is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ nullValue()

virtual bool jsonsax::nullValue ( )
protectedvirtual

Gets called when a null value is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ numberValue()

virtual bool jsonsax::numberValue ( const char * value)
protectedvirtual

Gets called when a number value is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ objectEnd()

virtual bool jsonsax::objectEnd ( )
protectedvirtual

Gets called when an object end is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ objectStart()

virtual bool jsonsax::objectStart ( )
protectedvirtual

Gets called when an object start is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ stringValue()

virtual bool jsonsax::stringValue ( const char * value)
protectedvirtual

Gets called when a string value is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ trueValue()

virtual bool jsonsax::trueValue ( )
protectedvirtual

Gets called when a true value is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ valueEnd()

virtual bool jsonsax::valueEnd ( )
protectedvirtual

Gets called when an value end is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.

◆ valueStart()

virtual bool jsonsax::valueStart ( )
protectedvirtual

Gets called when a value start is parsed.

Returns true on success and false if an error occurred. Parsing stops if this method returns false.

This implementation just returns true by a child class may override this method to do something else.

Reimplemented in jsondom.