JSON for Modern C++
3.10.2
|
◆ binary_t
template<template< typename U, typename V, typename... Args > class ObjectType = std::map, template< typename U, typename... Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator, template< typename T, typename SFINAE=void > class JSONSerializer = adl_serializer, class BinaryType = std::vector<std::uint8_t>>
This type is a type designed to carry binary data that appears in various serialized formats, such as CBOR's Major Type 2, MessagePack's bin, and BSON's generic binary subtype. This type is NOT a part of standard JSON and exists solely for compatibility with these binary types. As such, it is simply defined as an ordered sequence of zero or more byte values. Additionally, as an implementation detail, the subtype of the binary data is carried around as a CBOR's RFC 7049 describes this type as:
MessagePack's documentation on the bin type family describes this type as:
BSON's specifications describe several binary types; however, this type is intended to represent the generic binary type which has the description:
None of these impose any limitations on the internal representation other than the basic unit of storage be some type of array whose parts are decomposable into bytes. The default representation of this binary format is a Default typeThe default values for BinaryType is StorageBinary Arrays are stored as pointers in a basic_json type. That is, for any access to array values, a pointer of the type Notes on subtypes
|