! @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 */
| 9462 | @return whether a valid BSON-array was passed to the SAX parser |
| 9463 | */ |
| 9464 | bool parse_bson_array() |
| 9465 | { |
| 9466 | std::int32_t document_size{}; |
| 9467 | get_number<std::int32_t, true>(input_format_t::bson, document_size); |
| 9468 | |
| 9469 | if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast<std::size_t>(-1)))) |
| 9470 | { |
| 9471 | return false; |
| 9472 | } |
| 9473 | |
| 9474 | if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/true))) |
| 9475 | { |
| 9476 | return false; |
| 9477 | } |
| 9478 | |
| 9479 | return sax->end_array(); |
| 9480 | } |
| 9481 | |
| 9482 | ////////// |
| 9483 | // CBOR // |
nothing calls this directly
no test coverage detected