SIRIUS 7.5.0
Electronic structure library and applications
|
SAX interface. More...
#include <nlohmann_json.hpp>
Public Types | |
using | number_integer_t = typename BasicJsonType::number_integer_t |
using | number_unsigned_t = typename BasicJsonType::number_unsigned_t |
using | number_float_t = typename BasicJsonType::number_float_t |
using | string_t = typename BasicJsonType::string_t |
using | binary_t = typename BasicJsonType::binary_t |
Public Member Functions | |
virtual bool | null ()=0 |
a null value was read More... | |
virtual bool | boolean (bool val)=0 |
a boolean value was read More... | |
virtual bool | number_integer (number_integer_t val)=0 |
an integer number was read More... | |
virtual bool | number_unsigned (number_unsigned_t val)=0 |
an unsigned integer number was read More... | |
virtual bool | number_float (number_float_t val, const string_t &s)=0 |
a floating-point number was read More... | |
virtual bool | string (string_t &val)=0 |
a string value was read More... | |
virtual bool | binary (binary_t &val)=0 |
a binary value was read More... | |
virtual bool | start_object (std::size_t elements)=0 |
the beginning of an object was read More... | |
virtual bool | key (string_t &val)=0 |
an object key was read More... | |
virtual bool | end_object ()=0 |
the end of an object was read More... | |
virtual bool | start_array (std::size_t elements)=0 |
the beginning of an array was read More... | |
virtual bool | end_array ()=0 |
the end of an array was read More... | |
virtual bool | parse_error (std::size_t position, const std::string &last_token, const detail::exception &ex)=0 |
a parse error occurred More... | |
json_sax (const json_sax &)=default | |
json_sax (json_sax &&) noexcept=default | |
json_sax & | operator= (const json_sax &)=default |
json_sax & | operator= (json_sax &&) noexcept=default |
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.
Definition at line 6603 of file nlohmann_json.hpp.
using json_sax< BasicJsonType >::number_integer_t = typename BasicJsonType::number_integer_t |
Definition at line 6605 of file nlohmann_json.hpp.
using json_sax< BasicJsonType >::number_unsigned_t = typename BasicJsonType::number_unsigned_t |
Definition at line 6606 of file nlohmann_json.hpp.
using json_sax< BasicJsonType >::number_float_t = typename BasicJsonType::number_float_t |
Definition at line 6607 of file nlohmann_json.hpp.
using json_sax< BasicJsonType >::string_t = typename BasicJsonType::string_t |
Definition at line 6608 of file nlohmann_json.hpp.
using json_sax< BasicJsonType >::binary_t = typename BasicJsonType::binary_t |
Definition at line 6609 of file nlohmann_json.hpp.
|
pure virtual |
a null value was read
|
pure virtual |
a boolean value was read
[in] | val | boolean value |
|
pure virtual |
an integer number was read
[in] | val | integer value |
|
pure virtual |
an unsigned integer number was read
[in] | val | unsigned integer value |
|
pure virtual |
a floating-point number was read
[in] | val | floating-point value |
[in] | s | raw token value |
|
pure virtual |
a string value was read
[in] | val | string value |
|
pure virtual |
a binary value was read
[in] | val | binary value |
|
pure virtual |
the beginning of an object was read
[in] | elements | number of object elements or -1 if unknown |
|
pure virtual |
an object key was read
[in] | val | object key |
|
pure virtual |
the end of an object was read
|
pure virtual |
the beginning of an array was read
[in] | elements | number of array elements or -1 if unknown |
|
pure virtual |
the end of an array was read
|
pure virtual |
a parse error occurred
[in] | position | the position in the input where the error occurs |
[in] | last_token | the last read token |
[in] | ex | an exception object describing the error |