! @brief Writes a BSON element with key @a name and array @a value */
| 16043 | @brief Writes a BSON element with key @a name and array @a value |
| 16044 | */ |
| 16045 | void write_bson_array(const string_t& name, |
| 16046 | const typename BasicJsonType::array_t& value) |
| 16047 | { |
| 16048 | write_bson_entry_header(name, 0x04); // array |
| 16049 | write_number<std::int32_t>(static_cast<std::int32_t>(calc_bson_array_size(value)), true); |
| 16050 | |
| 16051 | std::size_t array_index = 0ul; |
| 16052 | |
| 16053 | for (const auto& el : value) |
| 16054 | { |
| 16055 | write_bson_element(std::to_string(array_index++), el); |
| 16056 | } |
| 16057 | |
| 16058 | oa->write_character(to_char_type(0x00)); |
| 16059 | } |
| 16060 | |
| 16061 | /*! |
| 16062 | @brief Writes a BSON element with key @a name and binary value @a value |
nothing calls this directly
no test coverage detected