WPILibC++  unspecified
wpi::json::binary_reader Class Reference

deserialization of CBOR and MessagePack values More...

Public Member Functions

 binary_reader (raw_istream &s)
 create a binary reader More...
 
json parse_cbor (const bool strict)
 create a JSON value from CBOR input More...
 
json parse_msgpack (const bool strict)
 create a JSON value from MessagePack input More...
 
json parse_ubjson (const bool strict)
 create a JSON value from UBJSON input More...
 

Static Public Member Functions

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

Detailed Description

deserialization of CBOR and MessagePack values

Constructor & Destructor Documentation

wpi::json::binary_reader::binary_reader ( raw_istream s)
inlineexplicit

create a binary reader

Parameters
[in]adapterinput adapter to read from

Member Function Documentation

static bool wpi::json::binary_reader::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
json wpi::json::binary_reader::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
json wpi::json::binary_reader::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
json wpi::json::binary_reader::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: