Orcus
Public Member Functions | List of all members
orcus::json_handler Class Reference

Public Member Functions

void begin_parse ()
 
void end_parse ()
 
void begin_array ()
 
void end_array ()
 
void begin_object ()
 
void object_key (const char *p, size_t len, bool transient)
 
void end_object ()
 
void boolean_true ()
 
void boolean_false ()
 
void null ()
 
void string (const char *p, size_t len, bool transient)
 
void number (double val)
 

Member Function Documentation

◆ begin_array()

void orcus::json_handler::begin_array ( )
inline

Called when the opening brace of an array is encountered.

◆ begin_object()

void orcus::json_handler::begin_object ( )
inline

Called when the opening curly brace of an object is encountered.

◆ begin_parse()

void orcus::json_handler::begin_parse ( )
inline

Called when the parsing begins.

◆ boolean_false()

void orcus::json_handler::boolean_false ( )
inline

Called when a boolean 'false' keyword is encountered.

◆ boolean_true()

void orcus::json_handler::boolean_true ( )
inline

Called when a boolean 'true' keyword is encountered.

◆ end_array()

void orcus::json_handler::end_array ( )
inline

Called when the closing brace of an array is encountered.

◆ end_object()

void orcus::json_handler::end_object ( )
inline

Called when the closing curly brace of an object is encountered.

◆ end_parse()

void orcus::json_handler::end_parse ( )
inline

Called when the parsing ends.

◆ null()

void orcus::json_handler::null ( )
inline

Called when a 'null' keyword is encountered.

◆ number()

void orcus::json_handler::number ( double  val)
inline

Called when a numeric value is encountered.

Parameters
valnumeric value.

◆ object_key()

void orcus::json_handler::object_key ( const char *  p,
size_t  len,
bool  transient 
)
inline

Called when a key value string of an object is encountered.

Parameters
ppointer to the first character of the key value string.
lenlength of the key value string.
transienttrue if the string value is stored in a temporary buffer which is not guaranteed to hold the string value after the end of this callback. When false, the pointer points to somewhere in the JSON stream being parsed.

◆ string()

void orcus::json_handler::string ( const char *  p,
size_t  len,
bool  transient 
)
inline

Called when a string value is encountered.

Parameters
ppointer to the first character of the string value.
lenlength of the string value.
transienttrue if the string value is stored in a temporary buffer which is not guaranteed to hold the string value after the end of this callback. When false, the pointer points to somewhere in the JSON stream being parsed.