Motor OpenGL
Cargando...
Buscando...
Nada coincide
Referencia de la plantilla de la estructura json_sax< BasicJsonType >abstract

SAX interface. Más...

#include <json.hpp>

Métodos públicos

virtual bool null ()=0
 a null value was read
virtual bool boolean (bool val)=0
 a boolean value was read
virtual bool number_integer (number_integer_t val)=0
 an integer number was read
virtual bool number_unsigned (number_unsigned_t val)=0
 an unsigned integer number was read
virtual bool number_float (number_float_t val, const string_t &s)=0
 a floating-point number was read
virtual bool string (string_t &val)=0
 a string value was read
virtual bool binary (binary_t &val)=0
 a binary value was read
virtual bool start_object (std::size_t elements)=0
 the beginning of an object was read
virtual bool key (string_t &val)=0
 an object key was read
virtual bool end_object ()=0
 the end of an object was read
virtual bool start_array (std::size_t elements)=0
 the beginning of an array was read
virtual bool end_array ()=0
 the end of an array was read
virtual bool parse_error (std::size_t position, const std::string &last_token, const detail::exception &ex)=0
 a parse error occurred

Descripción detallada

template<typename BasicJsonType>
struct json_sax< BasicJsonType >

SAX interface.

This class describes the SAX interface used by nlohmann::json::sax_parse. Each function is called in different situations while the input is parsed. The boolean return value informs the parser whether to continue processing the input.

Documentación de funciones miembro

◆ binary()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::binary ( binary_t & val)
pure virtual

a binary value was read

Parámetros
[in]valbinary value
Devuelve
whether parsing should proceed
Nota
It is safe to move the passed binary value.

◆ boolean()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::boolean ( bool val)
pure virtual

a boolean value was read

Parámetros
[in]valboolean value
Devuelve
whether parsing should proceed

◆ end_array()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::end_array ( )
pure virtual

the end of an array was read

Devuelve
whether parsing should proceed

◆ end_object()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::end_object ( )
pure virtual

the end of an object was read

Devuelve
whether parsing should proceed

◆ key()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::key ( string_t & val)
pure virtual

an object key was read

Parámetros
[in]valobject key
Devuelve
whether parsing should proceed
Nota
It is safe to move the passed string.

◆ null()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::null ( )
pure virtual

a null value was read

Devuelve
whether parsing should proceed

◆ number_float()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::number_float ( number_float_t val,
const string_t & s )
pure virtual

a floating-point number was read

Parámetros
[in]valfloating-point value
[in]sraw token value
Devuelve
whether parsing should proceed

◆ number_integer()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::number_integer ( number_integer_t val)
pure virtual

an integer number was read

Parámetros
[in]valinteger value
Devuelve
whether parsing should proceed

◆ number_unsigned()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::number_unsigned ( number_unsigned_t val)
pure virtual

an unsigned integer number was read

Parámetros
[in]valunsigned integer value
Devuelve
whether parsing should proceed

◆ parse_error()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::parse_error ( std::size_t position,
const std::string & last_token,
const detail::exception & ex )
pure virtual

a parse error occurred

Parámetros
[in]positionthe position in the input where the error occurs
[in]last_tokenthe last read token
[in]exan exception object describing the error
Devuelve
whether parsing should proceed (must return false)

◆ start_array()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::start_array ( std::size_t elements)
pure virtual

the beginning of an array was read

Parámetros
[in]elementsnumber of array elements or -1 if unknown
Devuelve
whether parsing should proceed
Nota
binary formats may report the number of elements

◆ start_object()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::start_object ( std::size_t elements)
pure virtual

the beginning of an object was read

Parámetros
[in]elementsnumber of object elements or -1 if unknown
Devuelve
whether parsing should proceed
Nota
binary formats may report the number of elements

◆ string()

template<typename BasicJsonType>
virtual bool json_sax< BasicJsonType >::string ( string_t & val)
pure virtual

a string value was read

Parámetros
[in]valstring value
Devuelve
whether parsing should proceed
Nota
It is safe to move the passed string value.