! @brief Writes a BSON element with key @a name and binary value @a value */
| 13815 | @brief Writes a BSON element with key @a name and binary value @a value |
| 13816 | */ |
| 13817 | void write_bson_binary(const string_t& name, |
| 13818 | const binary_t& value) |
| 13819 | { |
| 13820 | write_bson_entry_header(name, 0x05); |
| 13821 | |
| 13822 | write_number<std::int32_t, true>(static_cast<std::int32_t>(value.size())); |
| 13823 | write_number(value.has_subtype() ? value.subtype() : std::uint8_t(0x00)); |
| 13824 | |
| 13825 | oa->write_characters(reinterpret_cast<const CharType*>(value.data()), value.size()); |
| 13826 | } |
| 13827 | |
| 13828 | /*! |
| 13829 | @brief Calculates the size necessary to serialize the JSON value @a j with its @a name |
nothing calls this directly
no test coverage detected