serialization to CBOR and MessagePack values
More...
#include <json.hpp>
|
template<typename C = CharType, enable_if_t< std::is_signed< C >::value &&std::is_signed< char >::value > * = nullptr> |
static constexpr CharType | to_char_type (std::uint8_t x) noexcept |
|
template<typename C = CharType, enable_if_t< std::is_signed< C >::value &&std::is_unsigned< char >::value > * = nullptr> |
static CharType | to_char_type (std::uint8_t x) noexcept |
|
template<typename C = CharType, enable_if_t< std::is_unsigned< C >::value > * = nullptr> |
static constexpr CharType | to_char_type (std::uint8_t x) noexcept |
|
template<typename InputCharType , typename C = CharType, enable_if_t< std::is_signed< C >::value &&std::is_signed< char >::value &&std::is_same< char, typename std::remove_cv< InputCharType >::type >::value > * = nullptr> |
static constexpr CharType | to_char_type (InputCharType x) noexcept |
|
template<typename BasicJsonType, typename CharType>
class detail::binary_writer< BasicJsonType, CharType >
serialization to CBOR and MessagePack values
◆ binary_writer()
template<typename BasicJsonType , typename CharType >
create a binary writer
- Parameters
-
[in] | adapter | output adapter to write to |
◆ to_char_type() [1/4]
template<typename BasicJsonType , typename CharType >
template<typename InputCharType , typename C = CharType, enable_if_t< std::is_signed< C >::value &&std::is_signed< char >::value &&std::is_same< char, typename std::remove_cv< InputCharType >::type >::value > * = nullptr>
static constexpr CharType detail::binary_writer< BasicJsonType, CharType >::to_char_type |
( |
InputCharType |
x | ) |
|
|
inlinestaticconstexprnoexcept |
◆ to_char_type() [2/4]
template<typename BasicJsonType , typename CharType >
template<typename C = CharType, enable_if_t< std::is_signed< C >::value &&std::is_signed< char >::value > * = nullptr>
static constexpr CharType detail::binary_writer< BasicJsonType, CharType >::to_char_type |
( |
std::uint8_t |
x | ) |
|
|
inlinestaticconstexprnoexcept |
◆ to_char_type() [3/4]
template<typename BasicJsonType , typename CharType >
template<typename C = CharType, enable_if_t< std::is_signed< C >::value &&std::is_unsigned< char >::value > * = nullptr>
◆ to_char_type() [4/4]
template<typename BasicJsonType , typename CharType >
template<typename C = CharType, enable_if_t< std::is_unsigned< C >::value > * = nullptr>
static constexpr CharType detail::binary_writer< BasicJsonType, CharType >::to_char_type |
( |
std::uint8_t |
x | ) |
|
|
inlinestaticconstexprnoexcept |
◆ write_bson()
template<typename BasicJsonType , typename CharType >
- Parameters
-
[in] | j | JSON value to serialize |
- Precondition
- j.type() == value_t::object
◆ write_cbor()
template<typename BasicJsonType , typename CharType >
- Parameters
-
[in] | j | JSON value to serialize |
◆ write_msgpack()
template<typename BasicJsonType , typename CharType >
- Parameters
-
[in] | j | JSON value to serialize |
◆ write_ubjson()
template<typename BasicJsonType , typename CharType >
void detail::binary_writer< BasicJsonType, CharType >::write_ubjson |
( |
const BasicJsonType & |
j, |
|
|
const bool |
use_count, |
|
|
const bool |
use_type, |
|
|
const bool |
add_prefix = true , |
|
|
const bool |
use_bjdata = false |
|
) |
| |
|
inline |
- Parameters
-
[in] | j | JSON value to serialize |
[in] | use_count | whether to use '#' prefixes (optimized format) |
[in] | use_type | whether to use '$' prefixes (optimized format) |
[in] | add_prefix | whether prefixes need to be used for this value |
[in] | use_bjdata | whether write in BJData format, default is false |
The documentation for this class was generated from the following file: