! @param[in] j JSON value to serialize @pre j.type() == value_t::object */
| 14014 | @pre j.type() == value_t::object |
| 14015 | */ |
| 14016 | void write_bson_object(const typename BasicJsonType::object_t& value) |
| 14017 | { |
| 14018 | write_number<std::int32_t, true>(static_cast<std::int32_t>(calc_bson_object_size(value))); |
| 14019 | |
| 14020 | for (const auto& el : value) |
| 14021 | { |
| 14022 | write_bson_element(el.first, el.second); |
| 14023 | } |
| 14024 | |
| 14025 | oa->write_character(to_char_type(0x00)); |
| 14026 | } |
| 14027 | |
| 14028 | ////////// |
| 14029 | // CBOR // |
nothing calls this directly
no test coverage detected