Horizon
Public Member Functions | Static Public Member Functions | List of all members
nlohmann::detail::binary_reader< BasicJsonType > Class Template Reference

deserialization of CBOR and MessagePack values More...

#include <binary_reader.hpp>

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...
 
BasicJsonType parse_ubjson (const bool strict)
 create a JSON value from UBJSON 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

◆ little_endianess()

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

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

◆ 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

◆ 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

◆ parse_ubjson()

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

create a JSON value from UBJSON input

Parameters
[in]strictwhether to expect the input to be consumed completed
Returns
JSON value created from UBJSON 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

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