nlohmann::json_sax
json.hpp
typename BasicJsonType
typename BasicJsonType::number_integer_t using nlohmann::json_sax< BasicJsonType >::number_integer_t = typename BasicJsonType::number_integer_t number_integer_t
typename BasicJsonType::number_unsigned_t using nlohmann::json_sax< BasicJsonType >::number_unsigned_t = typename BasicJsonType::number_unsigned_t number_unsigned_t
typename BasicJsonType::number_float_t using nlohmann::json_sax< BasicJsonType >::number_float_t = typename BasicJsonType::number_float_t number_float_t
typename BasicJsonType::string_t using nlohmann::json_sax< BasicJsonType >::string_t = typename BasicJsonType::string_t string_t
typename BasicJsonType::binary_t using nlohmann::json_sax< BasicJsonType >::binary_t = typename BasicJsonType::binary_t binary_t
bool virtual bool nlohmann::json_sax< BasicJsonType >::null ()=0 null

a null value was read

whether parsing should proceed

bool virtual bool nlohmann::json_sax< BasicJsonType >::boolean (bool val)=0 boolean bool val

a boolean value was read

val

boolean value

whether parsing should proceed

bool virtual bool nlohmann::json_sax< BasicJsonType >::number_integer (number_integer_t val)=0 number_integer number_integer_t val

an integer number was read

val

integer value

whether parsing should proceed

bool virtual bool nlohmann::json_sax< BasicJsonType >::number_unsigned (number_unsigned_t val)=0 number_unsigned number_unsigned_t val

an unsigned integer number was read

val

unsigned integer value

whether parsing should proceed

bool virtual bool nlohmann::json_sax< BasicJsonType >::number_float (number_float_t val, const string_t &s)=0 number_float number_float_t val const string_t & s

an floating-point number was read

val

floating-point value

s

raw token value

whether parsing should proceed

bool virtual bool nlohmann::json_sax< BasicJsonType >::string (string_t &val)=0 string string_t & val

a string was read

val

string value

whether parsing should proceed

It is safe to move the passed string.

bool virtual bool nlohmann::json_sax< BasicJsonType >::binary (binary_t &val)=0 binary binary_t & val

a binary string was read

val

binary value

whether parsing should proceed

It is safe to move the passed binary.

bool virtual bool nlohmann::json_sax< BasicJsonType >::start_object (std::size_t elements)=0 start_object std::size_t elements

the beginning of an object was read

elements

number of object elements or -1 if unknown

whether parsing should proceed

binary formats may report the number of elements

bool virtual bool nlohmann::json_sax< BasicJsonType >::key (string_t &val)=0 key string_t & val

an object key was read

val

object key

whether parsing should proceed

It is safe to move the passed string.

bool virtual bool nlohmann::json_sax< BasicJsonType >::end_object ()=0 end_object

the end of an object was read

whether parsing should proceed

bool virtual bool nlohmann::json_sax< BasicJsonType >::start_array (std::size_t elements)=0 start_array std::size_t elements

the beginning of an array was read

elements

number of array elements or -1 if unknown

whether parsing should proceed

binary formats may report the number of elements

bool virtual bool nlohmann::json_sax< BasicJsonType >::end_array ()=0 end_array

the end of an array was read

whether parsing should proceed

bool virtual bool nlohmann::json_sax< BasicJsonType >::parse_error (std::size_t position, const std::string &last_token, const detail::exception &ex)=0 parse_error std::size_t position const std::string & last_token const detail::exception & ex

a parse error occurred

position

the position in the input where the error occurs

last_token

the last read token

ex

an exception object describing the error

whether parsing should proceed (must return false)

nlohmann::json_sax< BasicJsonType >::json_sax
()=default
json_sax
nlohmann::json_sax< BasicJsonType >::json_sax
(const json_sax &)=default
json_sax
const json_sax &
nlohmann::json_sax< BasicJsonType >::json_sax
(json_sax &&) noexcept=default
json_sax
json_sax &&
json_sax & json_sax& nlohmann::json_sax< BasicJsonType >::operator= (const json_sax &)=default operator= const json_sax &
json_sax & json_sax& nlohmann::json_sax< BasicJsonType >::operator= (json_sax &&) noexcept=default operator= json_sax &&
virtual nlohmann::json_sax< BasicJsonType >::~json_sax
()=default
~json_sax

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.

nlohmann::json_sax< BasicJsonType >
- nlohmann::json_sax
  binary
- nlohmann::json_sax
  binary_t
- nlohmann::json_sax
  boolean
- nlohmann::json_sax
  end_array
- nlohmann::json_sax
  end_object
- nlohmann::json_sax
  json_sax
- nlohmann::json_sax
  json_sax
- nlohmann::json_sax
  json_sax
- nlohmann::json_sax
  key
- nlohmann::json_sax
  null
- nlohmann::json_sax
  number_float
- nlohmann::json_sax
  number_float_t
- nlohmann::json_sax
  number_integer
- nlohmann::json_sax
  number_integer_t
- nlohmann::json_sax
  number_unsigned
- nlohmann::json_sax
  number_unsigned_t
- nlohmann::json_sax
  operator=
- nlohmann::json_sax
  operator=
- nlohmann::json_sax
  parse_error
- nlohmann::json_sax
  start_array
- nlohmann::json_sax
  start_object
- nlohmann::json_sax
  string
- nlohmann::json_sax
  string_t
- nlohmann::json_sax
  ~json_sax