! @brief Writes a BSON element with key @a name and array @a value */
| 13871 | @brief Writes a BSON element with key @a name and array @a value |
| 13872 | */ |
| 13873 | void write_bson_array(const string_t& name, |
| 13874 | const typename BasicJsonType::array_t& value) |
| 13875 | { |
| 13876 | write_bson_entry_header(name, 0x04); // array |
| 13877 | write_number<std::int32_t, true>(static_cast<std::int32_t>(calc_bson_array_size(value))); |
| 13878 | |
| 13879 | std::size_t array_index = 0ul; |
| 13880 | |
| 13881 | for (const auto& el : value) |
| 13882 | { |
| 13883 | write_bson_element(std::to_string(array_index++), el); |
| 13884 | } |
| 13885 | |
| 13886 | oa->write_character(to_char_type(0x00)); |
| 13887 | } |
| 13888 | |
| 13889 | /*! |
| 13890 | @brief Writes a BSON element with key @a name and binary value @a value |
nothing calls this directly
no test coverage detected