14991 {
14993
14994 switch (j.type())
14995 {
14998
15001
15004
15006 return header_size + 1ul;
15007
15009 return header_size + 8ul;
15010
15013
15016
15019
15021 return header_size + 0ul;
15022
15023
15025 default:
15026 JSON_ASSERT(false);
15027 return 0ul;
15028
15029 }
15030 }
static std::size_t calc_bson_entry_header_size(const string_t &name, const BasicJsonType &j)
static std::size_t calc_bson_binary_size(const typename BasicJsonType::binary_t &value)
static constexpr std::size_t calc_bson_unsigned_size(const std::uint64_t value) noexcept
static std::size_t calc_bson_object_size(const typename BasicJsonType::object_t &value)
Calculates the size of the BSON serialization of the given JSON-object j.
static std::size_t calc_bson_string_size(const string_t &value)
static std::size_t calc_bson_integer_size(const std::int64_t value)
static std::size_t calc_bson_array_size(const typename BasicJsonType::array_t &value)
@ number_integer
number value (signed integer)
@ discarded
discarded by the parser callback function
@ binary
binary array (ordered collection of bytes)
@ object
object (unordered set of name/value pairs)
@ number_float
number value (floating-point)
@ number_unsigned
number value (unsigned integer)
@ array
array (ordered collection of values)