Horizon
Public Member Functions | List of all members
nlohmann::detail::binary_writer< BasicJsonType, CharType > Class Template Reference

serialization to CBOR and MessagePack values More...

#include <binary_writer.hpp>

Public Member Functions

 binary_writer (output_adapter_t< CharType > adapter)
 create a binary writer More...
 
void write_cbor (const BasicJsonType &j)
 [in] j JSON value to serialize
 
void write_msgpack (const BasicJsonType &j)
 [in] j JSON value to serialize
 
void write_ubjson (const BasicJsonType &j, const bool use_count, const bool use_type, const bool add_prefix=true)
 

Detailed Description

template<typename BasicJsonType, typename CharType>
class nlohmann::detail::binary_writer< BasicJsonType, CharType >

serialization to CBOR and MessagePack values

Constructor & Destructor Documentation

◆ binary_writer()

template<typename BasicJsonType , typename CharType >
nlohmann::detail::binary_writer< BasicJsonType, CharType >::binary_writer ( output_adapter_t< CharType >  adapter)
inlineexplicit

create a binary writer

Parameters
[in]adapteroutput adapter to write to

Member Function Documentation

◆ write_ubjson()

template<typename BasicJsonType , typename CharType >
void nlohmann::detail::binary_writer< BasicJsonType, CharType >::write_ubjson ( const BasicJsonType &  j,
const bool  use_count,
const bool  use_type,
const bool  add_prefix = true 
)
inline
Parameters
[in]jJSON value to serialize
[in]use_countwhether to use '#' prefixes (optimized format)
[in]use_typewhether to use '$' prefixes (optimized format)
[in]add_prefixwhether prefixes need to be used for this value

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