Ditto 4.8.0-rc.2
Loading...
Searching...
No Matches
detail::binary_reader< BasicJsonType, InputAdapterType, SAX > Class Template Reference

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

#include <json.hpp>

Public Member Functions

 binary_reader (InputAdapterType &&adapter, const input_format_t format=input_format_t::json) noexcept
 create a binary reader
 
 binary_reader (const binary_reader &)=delete
 
 binary_reader (binary_reader &&)=default
 
binary_readeroperator= (const binary_reader &)=delete
 
binary_readeroperator= (binary_reader &&)=default
 
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)
 

Detailed Description

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

deserialization of CBOR, MessagePack, and UBJSON values

Constructor & Destructor Documentation

◆ binary_reader()

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
detail::binary_reader< BasicJsonType, InputAdapterType, SAX >::binary_reader ( InputAdapterType && adapter,
const input_format_t format = input_format_t::json )
inlineexplicitnoexcept

create a binary reader

Parameters
[in]adapterinput adapter to read from

Member Function Documentation

◆ sax_parse()

template<typename BasicJsonType , typename InputAdapterType , typename SAX = json_sax_dom_parser<BasicJsonType>>
bool 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
whether parsing was successful