GPC  v1.0.0-2516
Gorman Print Control
nlohmann::detail::binary_reader< BasicJsonType > Class Template Reference

deserialization of CBOR and MessagePack values More...

Public Member Functions

 binary_reader (input_adapter_t adapter)
 create a binary reader More...
 
BasicJsonType parse_cbor (const bool strict)
 create a JSON value from CBOR input More...
 
BasicJsonType parse_msgpack (const bool strict)
 create a JSON value from MessagePack input More...
 

Static Public Member Functions

static constexpr bool little_endianess (int num=1) noexcept
 determine system byte order More...
 

Detailed Description

template<typename BasicJsonType>
class nlohmann::detail::binary_reader< BasicJsonType >

deserialization of CBOR and MessagePack values

Constructor & Destructor Documentation

◆ binary_reader()

template<typename BasicJsonType >
nlohmann::detail::binary_reader< BasicJsonType >::binary_reader ( input_adapter_t  adapter)
inlineexplicit

create a binary reader

Parameters
[in]adapterinput adapter to read from

Member Function Documentation

◆ parse_cbor()

template<typename BasicJsonType >
BasicJsonType nlohmann::detail::binary_reader< BasicJsonType >::parse_cbor ( const bool  strict)
inline

create a JSON value from CBOR input

Parameters
[in]strictwhether to expect the input to be consumed completed
Returns
JSON value created from CBOR input
Exceptions
parse_error.110if input ended unexpectedly or the end of file was not reached when strict was set to true
parse_error.112if unsupported byte was read

Referenced by nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer >::from_cbor().

Here is the caller graph for this function:

◆ parse_msgpack()

template<typename BasicJsonType >
BasicJsonType nlohmann::detail::binary_reader< BasicJsonType >::parse_msgpack ( const bool  strict)
inline

create a JSON value from MessagePack input

Parameters
[in]strictwhether to expect the input to be consumed completed
Returns
JSON value created from MessagePack input
Exceptions
parse_error.110if input ended unexpectedly or the end of file was not reached when strict was set to true
parse_error.112if unsupported byte was read

Referenced by nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer >::from_msgpack().

Here is the caller graph for this function:

◆ little_endianess()

template<typename BasicJsonType >
static constexpr bool nlohmann::detail::binary_reader< BasicJsonType >::little_endianess ( int  num = 1)
inlinestaticnoexcept

determine system byte order

Returns
true if and only if system's byte order is little endian
Note
from http://stackoverflow.com/a/1001328/266378

References nlohmann::detail::array, nlohmann::detail::parse_error::create(), nlohmann::detail::null, nlohmann::detail::object, and nlohmann::detail::string.

Referenced by nlohmann::detail::binary_writer< BasicJsonType, CharType >::write_msgpack().

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