A Discrete-Event Network Simulator
API
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX > Class Template Reference

deserialization of CBOR, MessagePack, and UBJSON values More...

#include "json.h"

+ Collaboration diagram for nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >:

Public Member Functions

 binary_reader (binary_reader &&)=default
 
 binary_reader (binary_reader &&)=default
 
 binary_reader (const binary_reader &)=delete
 
 binary_reader (const binary_reader &)=delete
 
 binary_reader (InputAdapterType &&adapter)
 create a binary reader More...
 
 binary_reader (InputAdapterType &&adapter)
 create a binary reader More...
 
 ~binary_reader ()=default
 
 ~binary_reader ()=default
 
binary_readeroperator= (binary_reader &&)=default
 
binary_readeroperator= (binary_reader &&)=default
 
binary_readeroperator= (const binary_reader &)=delete
 
binary_readeroperator= (const binary_reader &)=delete
 
bool sax_parse (const input_format_t format, json_sax_t *sax_, const bool strict=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
 
bool sax_parse (const input_format_t format, json_sax_t *sax_, const bool strict=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error)
 

Private Types

using binary_t = typename BasicJsonType::binary_t
 
using binary_t = typename BasicJsonType::binary_t
 
using char_int_type = typename std::char_traits< char_type >::int_type
 
using char_int_type = typename std::char_traits< char_type >::int_type
 
using char_type = typename InputAdapterType::char_type
 
using char_type = typename InputAdapterType::char_type
 
using json_sax_t = SAX
 
using json_sax_t = SAX
 
using number_float_t = typename BasicJsonType::number_float_t
 
using number_float_t = typename BasicJsonType::number_float_t
 
using number_integer_t = typename BasicJsonType::number_integer_t
 
using number_integer_t = typename BasicJsonType::number_integer_t
 
using number_unsigned_t = typename BasicJsonType::number_unsigned_t
 
using number_unsigned_t = typename BasicJsonType::number_unsigned_t
 
using string_t = typename BasicJsonType::string_t
 
using string_t = typename BasicJsonType::string_t
 

Private Member Functions

std::string exception_message (const input_format_t format, const std::string &detail, const std::string &context) const
 
std::string exception_message (const input_format_t format, const std::string &detail, const std::string &context) const
 
char_int_type get ()
 get next character from the input More...
 
char_int_type get ()
 get next character from the input More...
 
template<typename NumberType >
bool get_binary (const input_format_t format, const NumberType len, binary_t &result)
 create a byte array by reading bytes from the input More...
 
template<typename NumberType >
bool get_binary (const input_format_t format, const NumberType len, binary_t &result)
 create a byte array by reading bytes from the input More...
 
template<typename NumberType >
bool get_bson_binary (const NumberType len, binary_t &result)
 Parses a byte array input of length len from the BSON input. More...
 
template<typename NumberType >
bool get_bson_binary (const NumberType len, binary_t &result)
 Parses a byte array input of length len from the BSON input. More...
 
bool get_bson_cstr (string_t &result)
 Parses a C-style string from the BSON input. More...
 
bool get_bson_cstr (string_t &result)
 Parses a C-style string from the BSON input. More...
 
template<typename NumberType >
bool get_bson_string (const NumberType len, string_t &result)
 Parses a zero-terminated string of length len from the BSON input. More...
 
template<typename NumberType >
bool get_bson_string (const NumberType len, string_t &result)
 Parses a zero-terminated string of length len from the BSON input. More...
 
bool get_cbor_array (const std::size_t len, const cbor_tag_handler_t tag_handler)
 
bool get_cbor_array (const std::size_t len, const cbor_tag_handler_t tag_handler)
 
bool get_cbor_binary (binary_t &result)
 reads a CBOR byte array More...
 
bool get_cbor_binary (binary_t &result)
 reads a CBOR byte array More...
 
bool get_cbor_object (const std::size_t len, const cbor_tag_handler_t tag_handler)
 
bool get_cbor_object (const std::size_t len, const cbor_tag_handler_t tag_handler)
 
bool get_cbor_string (string_t &result)
 reads a CBOR string More...
 
bool get_cbor_string (string_t &result)
 reads a CBOR string More...
 
char_int_type get_ignore_noop ()
 
char_int_type get_ignore_noop ()
 
bool get_msgpack_array (const std::size_t len)
 
bool get_msgpack_array (const std::size_t len)
 
bool get_msgpack_binary (binary_t &result)
 reads a MessagePack byte array More...
 
bool get_msgpack_binary (binary_t &result)
 reads a MessagePack byte array More...
 
bool get_msgpack_object (const std::size_t len)
 
bool get_msgpack_object (const std::size_t len)
 
bool get_msgpack_string (string_t &result)
 reads a MessagePack string More...
 
bool get_msgpack_string (string_t &result)
 reads a MessagePack string More...
 
template<typename NumberType , bool InputIsLittleEndian = false>
bool get_number (const input_format_t format, NumberType &result)
 
template<typename NumberType , bool InputIsLittleEndian = false>
bool get_number (const input_format_t format, NumberType &result)
 
template<typename NumberType >
bool get_string (const input_format_t format, const NumberType len, string_t &result)
 create a string by reading characters from the input More...
 
template<typename NumberType >
bool get_string (const input_format_t format, const NumberType len, string_t &result)
 create a string by reading characters from the input More...
 
std::string get_token_string () const
 
std::string get_token_string () const
 
bool get_ubjson_array ()
 
bool get_ubjson_array ()
 
bool get_ubjson_high_precision_number ()
 
bool get_ubjson_high_precision_number ()
 
bool get_ubjson_object ()
 
bool get_ubjson_object ()
 
bool get_ubjson_size_type (std::pair< std::size_t, char_int_type > &result)
 determine the type and size for a container More...
 
bool get_ubjson_size_type (std::pair< std::size_t, char_int_type > &result)
 determine the type and size for a container More...
 
bool get_ubjson_size_value (std::size_t &result)
 
bool get_ubjson_size_value (std::size_t &result)
 
bool get_ubjson_string (string_t &result, const bool get_char=true)
 reads a UBJSON string More...
 
bool get_ubjson_string (string_t &result, const bool get_char=true)
 reads a UBJSON string More...
 
bool get_ubjson_value (const char_int_type prefix)
 
bool get_ubjson_value (const char_int_type prefix)
 
bool parse_bson_array ()
 Reads an array from the BSON input and passes it to the SAX-parser. More...
 
bool parse_bson_array ()
 Reads an array from the BSON input and passes it to the SAX-parser. More...
 
bool parse_bson_element_internal (const char_int_type element_type, const std::size_t element_type_parse_position)
 Read a BSON document element of the given element_type. More...
 
bool parse_bson_element_internal (const char_int_type element_type, const std::size_t element_type_parse_position)
 Read a BSON document element of the given element_type. More...
 
bool parse_bson_element_list (const bool is_array)
 Read a BSON element list (as specified in the BSON-spec) More...
 
bool parse_bson_element_list (const bool is_array)
 Read a BSON element list (as specified in the BSON-spec) More...
 
bool parse_bson_internal ()
 Reads in a BSON-object and passes it to the SAX-parser. More...
 
bool parse_bson_internal ()
 Reads in a BSON-object and passes it to the SAX-parser. More...
 
bool parse_cbor_internal (const bool get_char, const cbor_tag_handler_t tag_handler)
 
bool parse_cbor_internal (const bool get_char, const cbor_tag_handler_t tag_handler)
 
bool parse_msgpack_internal ()
 
bool parse_msgpack_internal ()
 
bool parse_ubjson_internal (const bool get_char=true)
 
bool parse_ubjson_internal (const bool get_char=true)
 
bool unexpect_eof (const input_format_t format, const char *context) const
 
bool unexpect_eof (const input_format_t format, const char *context) const
 

Private Attributes

std::size_t chars_read = 0
 the number of characters read More...
 
char_int_type current = std::char_traits<char_type>::eof()
 the current character More...
 
InputAdapterType ia
 input adapter More...
 
const bool is_little_endian = little_endianess()
 whether we can assume little endianess More...
 
json_sax_tsax = nullptr
 the SAX parser More...
 

Detailed Description

template<typename BasicJsonType, typename InputAdapterType, typename SAX = json_sax_dom_parser<BasicJsonType>>
class nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >

deserialization of CBOR, MessagePack, and UBJSON values

Definition at line 7763 of file json.h.

Member Typedef Documentation

◆ binary_t [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::binary_t = typename BasicJsonType::binary_t
private

Definition at line 7769 of file json.h.

◆ binary_t [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::binary_t = typename BasicJsonType::binary_t
private

Definition at line 7769 of file json.h.

◆ char_int_type [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::char_int_type = typename std::char_traits<char_type>::int_type
private

Definition at line 7772 of file json.h.

◆ char_int_type [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::char_int_type = typename std::char_traits<char_type>::int_type
private

Definition at line 7772 of file json.h.

◆ char_type [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::char_type = typename InputAdapterType::char_type
private

Definition at line 7771 of file json.h.

◆ char_type [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::char_type = typename InputAdapterType::char_type
private

Definition at line 7771 of file json.h.

◆ json_sax_t [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::json_sax_t = SAX
private

Definition at line 7770 of file json.h.

◆ json_sax_t [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::json_sax_t = SAX
private

Definition at line 7770 of file json.h.

◆ number_float_t [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::number_float_t = typename BasicJsonType::number_float_t
private

Definition at line 7767 of file json.h.

◆ number_float_t [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::number_float_t = typename BasicJsonType::number_float_t
private

Definition at line 7767 of file json.h.

◆ number_integer_t [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::number_integer_t = typename BasicJsonType::number_integer_t
private

Definition at line 7765 of file json.h.

◆ number_integer_t [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::number_integer_t = typename BasicJsonType::number_integer_t
private

Definition at line 7765 of file json.h.

◆ number_unsigned_t [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::number_unsigned_t = typename BasicJsonType::number_unsigned_t
private

Definition at line 7766 of file json.h.

◆ number_unsigned_t [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::number_unsigned_t = typename BasicJsonType::number_unsigned_t
private

Definition at line 7766 of file json.h.

◆ string_t [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::string_t = typename BasicJsonType::string_t
private

Definition at line 7768 of file json.h.

◆ string_t [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
using nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::string_t = typename BasicJsonType::string_t
private

Definition at line 7768 of file json.h.

Constructor & Destructor Documentation

◆ binary_reader() [1/6]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::binary_reader ( InputAdapterType &&  adapter)
inlineexplicit

create a binary reader

Parameters
[in]adapterinput adapter to read from

Definition at line 7780 of file json.h.

◆ binary_reader() [2/6]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::binary_reader ( const binary_reader< BasicJsonType, InputAdapterType, SAX > &  )
delete

◆ binary_reader() [3/6]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::binary_reader ( binary_reader< BasicJsonType, InputAdapterType, SAX > &&  )
default

◆ ~binary_reader() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::~binary_reader ( )
default

◆ binary_reader() [4/6]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::binary_reader ( InputAdapterType &&  adapter)
inlineexplicit

create a binary reader

Parameters
[in]adapterinput adapter to read from

Definition at line 7780 of file json.h.

◆ binary_reader() [5/6]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::binary_reader ( const binary_reader< BasicJsonType, InputAdapterType, SAX > &  )
delete

◆ binary_reader() [6/6]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::binary_reader ( binary_reader< BasicJsonType, InputAdapterType, SAX > &&  )
default

◆ ~binary_reader() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::~binary_reader ( )
default

Member Function Documentation

◆ exception_message() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
std::string nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message ( const input_format_t  format,
const std::string &  detail,
const std::string &  context 
) const
inlineprivate
Parameters
[in]formatthe current format
[in]detaila detailed error message
[in]contextfurther context information
Returns
a message string to use in the parse_error exceptions

Definition at line 10119 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::cbor, JSON_ASSERT, nlohmann::detail::msgpack, and nlohmann::detail::ubjson.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_high_precision_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_type(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_value(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

+ Here is the caller graph for this function:

◆ exception_message() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
std::string nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message ( const input_format_t  format,
const std::string &  detail,
const std::string &  context 
) const
inlineprivate
Parameters
[in]formatthe current format
[in]detaila detailed error message
[in]contextfurther context information
Returns
a message string to use in the parse_error exceptions

Definition at line 10119 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::cbor, JSON_ASSERT, nlohmann::detail::msgpack, and nlohmann::detail::ubjson.

◆ get() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
char_int_type nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get ( )
inlineprivate

get next character from the input

This function provides the interface to the used input adapter. It does not throw in case the input reached EOF, but returns a -'ve valued std::char_traits<char_type>::eof() in that case.

Returns
character read from the input

Definition at line 9959 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::ia.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_cstr(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ignore_noop(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_high_precision_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_type(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse().

+ Here is the caller graph for this function:

◆ get() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
char_int_type nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get ( )
inlineprivate

get next character from the input

This function provides the interface to the used input adapter. It does not throw in case the input reached EOF, but returns a -'ve valued std::char_traits<char_type>::eof() in that case.

Returns
character read from the input

Definition at line 9959 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::ia.

◆ get_binary() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
template<typename NumberType >
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary ( const input_format_t  format,
const NumberType  len,
binary_t result 
)
inlineprivate

create a byte array by reading bytes from the input

Template Parameters
NumberTypethe type of the number
Parameters
[in]formatthe current format (for diagnostics)
[in]lennumber of bytes to read
[out]resultbyte array created by reading len bytes
Returns
whether byte array creation completed
Note
We can not reserve len bytes for the result, because len may be too large. Usually, unexpect_eof() detects the end of the input before we run out of memory.

Definition at line 10069 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), JSON_HEDLEY_UNLIKELY, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_binary().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_binary() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
template<typename NumberType >
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary ( const input_format_t  format,
const NumberType  len,
binary_t result 
)
inlineprivate

create a byte array by reading bytes from the input

Template Parameters
NumberTypethe type of the number
Parameters
[in]formatthe current format (for diagnostics)
[in]lennumber of bytes to read
[out]resultbyte array created by reading len bytes
Returns
whether byte array creation completed
Note
We can not reserve len bytes for the result, because len may be too large. Usually, unexpect_eof() detects the end of the input before we run out of memory.

Definition at line 10069 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), JSON_HEDLEY_UNLIKELY, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

+ Here is the call graph for this function:

◆ get_bson_binary() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
template<typename NumberType >
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_binary ( const NumberType  len,
binary_t result 
)
inlineprivate

Parses a byte array input of length len from the BSON input.

Parameters
[in]lenThe length of the byte array to be read.
[in,out]resultA reference to the binary variable where the read array is to be stored.
Template Parameters
NumberTypeThe type of the length len
Precondition
len >= 0
Returns
true if the byte array was successfully parsed

Definition at line 7938 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, and nlohmann::to_string().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_bson_binary() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
template<typename NumberType >
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_binary ( const NumberType  len,
binary_t result 
)
inlineprivate

Parses a byte array input of length len from the BSON input.

Parameters
[in]lenThe length of the byte array to be read.
[in,out]resultA reference to the binary variable where the read array is to be stored.
Template Parameters
NumberTypeThe type of the length len
Precondition
len >= 0
Returns
true if the byte array was successfully parsed

Definition at line 7938 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, and nlohmann::to_string().

+ Here is the call graph for this function:

◆ get_bson_cstr() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_cstr ( string_t result)
inlineprivate

Parses a C-style string from the BSON input.

Parameters
[in,out]resultA reference to the string variable where the read string is to be stored.
Returns
true if the \x00-byte indicating the end of the string was encountered before the EOF; false` indicates an unexpected EOF.

Definition at line 7887 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), JSON_HEDLEY_UNLIKELY, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_bson_cstr() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_cstr ( string_t result)
inlineprivate

Parses a C-style string from the BSON input.

Parameters
[in,out]resultA reference to the string variable where the read string is to be stored.
Returns
true if the \x00-byte indicating the end of the string was encountered before the EOF; false` indicates an unexpected EOF.

Definition at line 7887 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), JSON_HEDLEY_UNLIKELY, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

+ Here is the call graph for this function:

◆ get_bson_string() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
template<typename NumberType >
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_string ( const NumberType  len,
string_t result 
)
inlineprivate

Parses a zero-terminated string of length len from the BSON input.

Parameters
[in]lenThe length (including the zero-byte at the end) of the string to be read.
[in,out]resultA reference to the string variable where the read string is to be stored.
Template Parameters
NumberTypeThe type of the length len
Precondition
len >= 1
Returns
true if the string was successfully parsed

Definition at line 7917 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, and nlohmann::to_string().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_bson_string() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
template<typename NumberType >
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_string ( const NumberType  len,
string_t result 
)
inlineprivate

Parses a zero-terminated string of length len from the BSON input.

Parameters
[in]lenThe length (including the zero-byte at the end) of the string to be read.
[in,out]resultA reference to the string variable where the read string is to be stored.
Template Parameters
NumberTypeThe type of the length len
Precondition
len >= 1
Returns
true if the string was successfully parsed

Definition at line 7917 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, and nlohmann::to_string().

+ Here is the call graph for this function:

◆ get_cbor_array() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_array ( const std::size_t  len,
const cbor_tag_handler_t  tag_handler 
)
inlineprivate
Parameters
[in]lenthe length of the array or std::size_t(-1) for an array of indefinite size
[in]tag_handlerhow CBOR tags should be treated
Returns
whether array creation completed

Definition at line 8745 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_cbor_array() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_array ( const std::size_t  len,
const cbor_tag_handler_t  tag_handler 
)
inlineprivate
Parameters
[in]lenthe length of the array or std::size_t(-1) for an array of indefinite size
[in]tag_handlerhow CBOR tags should be treated
Returns
whether array creation completed

Definition at line 8745 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

+ Here is the call graph for this function:

◆ get_cbor_binary() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary ( binary_t result)
inlineprivate

reads a CBOR byte array

This function first reads starting bytes to determine the expected byte array length and then copies this number of bytes into the byte array. Additionally, CBOR's byte arrays with indefinite lengths are supported.

Parameters
[out]resultcreated byte array
Returns
whether byte array creation completed

Definition at line 8651 of file json.h.

References nlohmann::detail::cbor, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_cbor_binary() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary ( binary_t result)
inlineprivate

◆ get_cbor_object() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_object ( const std::size_t  len,
const cbor_tag_handler_t  tag_handler 
)
inlineprivate
Parameters
[in]lenthe length of the object or std::size_t(-1) for an object of indefinite size
[in]tag_handlerhow CBOR tags should be treated
Returns
whether object creation completed

Definition at line 8783 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::key, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_cbor_object() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_object ( const std::size_t  len,
const cbor_tag_handler_t  tag_handler 
)
inlineprivate
Parameters
[in]lenthe length of the object or std::size_t(-1) for an object of indefinite size
[in]tag_handlerhow CBOR tags should be treated
Returns
whether object creation completed

Definition at line 8783 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::key, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

+ Here is the call graph for this function:

◆ get_cbor_string() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string ( string_t result)
inlineprivate

reads a CBOR string

This function first reads starting bytes to determine the expected string length and then copies this number of bytes into a string. Additionally, CBOR's strings with indefinite lengths are supported.

Parameters
[out]resultcreated string
Returns
whether string creation completed

Definition at line 8556 of file json.h.

References nlohmann::detail::cbor, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_cbor_string() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string ( string_t result)
inlineprivate

◆ get_ignore_noop() [1/2]

◆ get_ignore_noop() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
char_int_type nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ignore_noop ( )
inlineprivate
Returns
character read from the input after ignoring all 'N' entries

Definition at line 9968 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get().

+ Here is the call graph for this function:

◆ get_msgpack_array() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_array ( const std::size_t  len)
inlineprivate
Parameters
[in]lenthe length of the array
Returns
whether array creation completed

Definition at line 9409 of file json.h.

References JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_msgpack_array() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_array ( const std::size_t  len)
inlineprivate
Parameters
[in]lenthe length of the array
Returns
whether array creation completed

Definition at line 9409 of file json.h.

References JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

+ Here is the call graph for this function:

◆ get_msgpack_binary() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_binary ( binary_t result)
inlineprivate

reads a MessagePack byte array

This function first reads starting bytes to determine the expected byte array length and then copies this number of bytes into a byte array.

Parameters
[out]resultcreated byte array
Returns
whether byte array creation completed

Definition at line 9298 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), and nlohmann::detail::msgpack.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_msgpack_binary() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_binary ( binary_t result)
inlineprivate

reads a MessagePack byte array

This function first reads starting bytes to determine the expected byte array length and then copies this number of bytes into a byte array.

Parameters
[out]resultcreated byte array
Returns
whether byte array creation completed

Definition at line 9298 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), and nlohmann::detail::msgpack.

+ Here is the call graph for this function:

◆ get_msgpack_object() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_object ( const std::size_t  len)
inlineprivate

◆ get_msgpack_object() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_object ( const std::size_t  len)
inlineprivate

◆ get_msgpack_string() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_string ( string_t result)
inlineprivate

◆ get_msgpack_string() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_string ( string_t result)
inlineprivate

◆ get_number() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
template<typename NumberType , bool InputIsLittleEndian = false>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number ( const input_format_t  format,
NumberType &  result 
)
inlineprivate

◆ get_number() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
template<typename NumberType , bool InputIsLittleEndian = false>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number ( const input_format_t  format,
NumberType &  result 
)
inlineprivate

◆ get_string() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
template<typename NumberType >
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_string ( const input_format_t  format,
const NumberType  len,
string_t result 
)
inlineprivate

create a string by reading characters from the input

Template Parameters
NumberTypethe type of the number
Parameters
[in]formatthe current format (for diagnostics)
[in]lennumber of characters to read
[out]resultstring created by reading len bytes
Returns
whether string creation completed
Note
We can not reserve len bytes for the result, because len may be too large. Usually, unexpect_eof() detects the end of the input before we run out of string memory.

Definition at line 10036 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), JSON_HEDLEY_UNLIKELY, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_string(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_string().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_string() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
template<typename NumberType >
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_string ( const input_format_t  format,
const NumberType  len,
string_t result 
)
inlineprivate

create a string by reading characters from the input

Template Parameters
NumberTypethe type of the number
Parameters
[in]formatthe current format (for diagnostics)
[in]lennumber of characters to read
[out]resultstring created by reading len bytes
Returns
whether string creation completed
Note
We can not reserve len bytes for the result, because len may be too large. Usually, unexpect_eof() detects the end of the input before we run out of string memory.

Definition at line 10036 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), JSON_HEDLEY_UNLIKELY, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

+ Here is the call graph for this function:

◆ get_token_string() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
std::string nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string ( ) const
inlineprivate

◆ get_token_string() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
std::string nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string ( ) const
inlineprivate
Returns
a string representation of the last read byte

Definition at line 10106 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current.

◆ get_ubjson_array() [1/2]

◆ get_ubjson_array() [2/2]

◆ get_ubjson_high_precision_number() [1/2]

◆ get_ubjson_high_precision_number() [2/2]

◆ get_ubjson_object() [1/2]

◆ get_ubjson_object() [2/2]

◆ get_ubjson_size_type() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_type ( std::pair< std::size_t, char_int_type > &  result)
inlineprivate

◆ get_ubjson_size_type() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_type ( std::pair< std::size_t, char_int_type > &  result)
inlineprivate

◆ get_ubjson_size_value() [1/2]

◆ get_ubjson_size_value() [2/2]

◆ get_ubjson_string() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_string ( string_t result,
const bool  get_char = true 
)
inlineprivate

reads a UBJSON string

This function is either called after reading the 'S' byte explicitly indicating a string, or in case of an object key where the 'S' byte can be left out.

Parameters
[out]resultcreated string
[in]get_charwhether a new character should be retrieved from the input (true, default) or whether the last read character should be considered instead
Returns
whether string creation completed

Definition at line 9487 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, nlohmann::detail::ubjson, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_object(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_ubjson_string() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_string ( string_t result,
const bool  get_char = true 
)
inlineprivate

◆ get_ubjson_value() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value ( const char_int_type  prefix)
inlineprivate
Parameters
prefixthe previously read or set type prefix
Returns
whether value creation completed

Definition at line 9659 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_high_precision_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_string(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, nlohmann::detail::ubjson, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_object(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_ubjson_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_ubjson_value() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value ( const char_int_type  prefix)
inlineprivate

◆ operator=() [1/4]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
binary_reader& nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::operator= ( binary_reader< BasicJsonType, InputAdapterType, SAX > &&  )
default

◆ operator=() [2/4]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
binary_reader& nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::operator= ( binary_reader< BasicJsonType, InputAdapterType, SAX > &&  )
default

◆ operator=() [3/4]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
binary_reader& nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::operator= ( const binary_reader< BasicJsonType, InputAdapterType, SAX > &  )
delete

◆ operator=() [4/4]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
binary_reader& nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::operator= ( const binary_reader< BasicJsonType, InputAdapterType, SAX > &  )
delete

◆ parse_bson_array() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_array ( )
inlineprivate

Reads an array from the BSON input and passes it to the SAX-parser.

Returns
whether a valid BSON-array was passed to the SAX parser

Definition at line 8080 of file json.h.

References nlohmann::detail::bson, JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_bson_array() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_array ( )
inlineprivate

Reads an array from the BSON input and passes it to the SAX-parser.

Returns
whether a valid BSON-array was passed to the SAX parser

Definition at line 8080 of file json.h.

References nlohmann::detail::bson, JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

+ Here is the call graph for this function:

◆ parse_bson_element_internal() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_internal ( const char_int_type  element_type,
const std::size_t  element_type_parse_position 
)
inlineprivate

Read a BSON document element of the given element_type.

Parameters
[in]element_typeThe BSON element type, c.f. http://bsonspec.org/spec.html
[in]element_type_parse_positionThe position in the input stream, where the element_type was read.
Warning
Not all BSON element types are supported yet. An unsupported element_type will give rise to a parse_error.114: Unsupported BSON record type 0x...
Returns
whether a valid BSON-object/array was passed to the SAX parser

Definition at line 7964 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_bson_element_internal() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_internal ( const char_int_type  element_type,
const std::size_t  element_type_parse_position 
)
inlineprivate

Read a BSON document element of the given element_type.

Parameters
[in]element_typeThe BSON element type, c.f. http://bsonspec.org/spec.html
[in]element_type_parse_positionThe position in the input stream, where the element_type was read.
Warning
Not all BSON element types are supported yet. An unsupported element_type will give rise to a parse_error.114: Unsupported BSON record type 0x...
Returns
whether a valid BSON-object/array was passed to the SAX parser

Definition at line 7964 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

+ Here is the call graph for this function:

◆ parse_bson_element_list() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list ( const bool  is_array)
inlineprivate

Read a BSON element list (as specified in the BSON-spec)

The same binary layout is used for objects and arrays, hence it must be indicated with the argument is_array which one is expected (true --> array, false --> object).

Parameters
[in]is_arrayDetermines if the element list being read is to be treated as an object (is_array == false), or as an array (is_array == true).
Returns
whether a valid BSON-object/array was passed to the SAX parser

Definition at line 8042 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_cstr(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::key, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_array(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_bson_element_list() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list ( const bool  is_array)
inlineprivate

Read a BSON element list (as specified in the BSON-spec)

The same binary layout is used for objects and arrays, hence it must be indicated with the argument is_array which one is expected (true --> array, false --> object).

Parameters
[in]is_arrayDetermines if the element list being read is to be treated as an object (is_array == false), or as an array (is_array == true).
Returns
whether a valid BSON-object/array was passed to the SAX parser

Definition at line 8042 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_cstr(), JSON_HEDLEY_UNLIKELY, nlohmann::detail::key, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

+ Here is the call graph for this function:

◆ parse_bson_internal() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_internal ( )
inlineprivate

Reads in a BSON-object and passes it to the SAX-parser.

Returns
whether a valid BSON-value was passed to the SAX parser

Definition at line 7862 of file json.h.

References nlohmann::detail::bson, JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_bson_internal() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_internal ( )
inlineprivate

Reads in a BSON-object and passes it to the SAX-parser.

Returns
whether a valid BSON-value was passed to the SAX parser

Definition at line 7862 of file json.h.

References nlohmann::detail::bson, JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

+ Here is the call graph for this function:

◆ parse_cbor_internal() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal ( const bool  get_char,
const cbor_tag_handler_t  tag_handler 
)
inlineprivate
Parameters
[in]get_charwhether a new character should be retrieved from the input (true) or whether the last read character should be considered instead (false)
[in]tag_handlerhow CBOR tags should be treated
Returns
whether a valid CBOR value was passed to the SAX parser

Definition at line 8110 of file json.h.

References nlohmann::detail::cbor, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::error, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), nlohmann::detail::ignore, JSON_ASSERT, JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_cbor_internal() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal ( const bool  get_char,
const cbor_tag_handler_t  tag_handler 
)
inlineprivate
Parameters
[in]get_charwhether a new character should be retrieved from the input (true) or whether the last read character should be considered instead (false)
[in]tag_handlerhow CBOR tags should be treated
Returns
whether a valid CBOR value was passed to the SAX parser

Definition at line 8110 of file json.h.

References nlohmann::detail::cbor, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::error, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), nlohmann::detail::ignore, JSON_ASSERT, JSON_HEDLEY_UNLIKELY, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

+ Here is the call graph for this function:

◆ parse_msgpack_internal() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal ( )
inlineprivate
Returns
whether a valid MessagePack value was passed to the SAX parser

Definition at line 8836 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), nlohmann::detail::msgpack, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_object(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_msgpack_internal() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal ( )
inlineprivate

◆ parse_ubjson_internal() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_ubjson_internal ( const bool  get_char = true)
inlineprivate
Parameters
[in]get_charwhether a new character should be retrieved from the input (true, default) or whether the last read character should be considered instead
Returns
whether a valid UBJSON value was passed to the SAX parser

Definition at line 9468 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ignore_noop(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value().

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_object(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_ubjson_internal() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_ubjson_internal ( const bool  get_char = true)
inlineprivate
Parameters
[in]get_charwhether a new character should be retrieved from the input (true, default) or whether the last read character should be considered instead
Returns
whether a valid UBJSON value was passed to the SAX parser

Definition at line 9468 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ignore_noop(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value().

+ Here is the call graph for this function:

◆ sax_parse() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse ( const input_format_t  format,
json_sax_t sax_,
const bool  strict = true,
const cbor_tag_handler_t  tag_handler = cbor_tag_handler_t::error 
)
inline
Parameters
[in]formatthe binary format to parse
[in]sax_a SAX event processor
[in]strictwhether to expect the input to be consumed completed
[in]tag_handlerhow to treat CBOR tags
Returns

Definition at line 7801 of file json.h.

References nlohmann::detail::bson, nlohmann::detail::cbor, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ignore_noop(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), JSON_ASSERT, JSON_HEDLEY_UNLIKELY, nlohmann::detail::msgpack, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_ubjson_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax, nlohmann::detail::strict, and nlohmann::detail::ubjson.

Referenced by nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_bson(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_cbor(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_msgpack(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::from_ubjson(), and nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::sax_parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sax_parse() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse ( const input_format_t  format,
json_sax_t sax_,
const bool  strict = true,
const cbor_tag_handler_t  tag_handler = cbor_tag_handler_t::error 
)
inline

◆ unexpect_eof() [1/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof ( const input_format_t  format,
const char *  context 
) const
inlineprivate
Parameters
[in]formatthe current format (for diagnostics)
[in]contextfurther context information (for diagnostics)
Returns
whether the last read character is not EOF

Definition at line 10093 of file json.h.

References nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read, nlohmann::detail::parse_error::create(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current, nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::exception_message(), JSON_HEDLEY_UNLIKELY, and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_cstr(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_high_precision_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_type(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unexpect_eof() [2/2]

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof ( const input_format_t  format,
const char *  context 
) const
inlineprivate

Member Data Documentation

◆ chars_read

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
std::size_t nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::chars_read = 0
private

the number of characters read

Definition at line 10158 of file json.h.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_high_precision_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_type(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_value(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

◆ current

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
char_int_type nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::current = std::char_traits<char_type>::eof()
private

the current character

Definition at line 10155 of file json.h.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_cstr(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ignore_noop(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_token_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_high_precision_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_type(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_ubjson_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().

◆ ia

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
InputAdapterType nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::ia
private

input adapter

Definition at line 10152 of file json.h.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get().

◆ is_little_endian

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
const bool nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::is_little_endian = little_endianess()
private

whether we can assume little endianess

Definition at line 10161 of file json.h.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_number().

◆ sax

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
json_sax_t * nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax = nullptr
private

the SAX parser

Definition at line 10164 of file json.h.

Referenced by nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_bson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_binary(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_cbor_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_msgpack_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_high_precision_number(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_object(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_type(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_size_value(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_string(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::get_ubjson_value(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_array(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_element_list(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_bson_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_cbor_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::parse_msgpack_internal(), nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::sax_parse(), and nlohmann::detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::unexpect_eof().


The documentation for this class was generated from the following file: