! @brief Reads an array from the BSON input and passes it to the SAX-parser. @return whether a valid BSON-array was passed to the SAX parser */
| 8078 | @return whether a valid BSON-array was passed to the SAX parser |
| 8079 | */ |
| 8080 | bool parse_bson_array() |
| 8081 | { |
| 8082 | std::int32_t document_size{}; |
| 8083 | get_number<std::int32_t, true>(input_format_t::bson, document_size); |
| 8084 | |
| 8085 | if (JSON_HEDLEY_UNLIKELY(!sax->start_array(std::size_t(-1)))) |
| 8086 | { |
| 8087 | return false; |
| 8088 | } |
| 8089 | |
| 8090 | if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/true))) |
| 8091 | { |
| 8092 | return false; |
| 8093 | } |
| 8094 | |
| 8095 | return sax->end_array(); |
| 8096 | } |
| 8097 | |
| 8098 | ////////// |
| 8099 | // CBOR // |
nothing calls this directly
no test coverage detected