! @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 */
| 5466 | @return whether a valid BSON-array was passed to the SAX parser |
| 5467 | */ |
| 5468 | bool parse_bson_array() |
| 5469 | { |
| 5470 | std::int32_t document_size; |
| 5471 | get_number<std::int32_t, true>(input_format_t::bson, document_size); |
| 5472 | |
| 5473 | if (JSON_HEDLEY_UNLIKELY(not sax->start_array(std::size_t(-1)))) |
| 5474 | { |
| 5475 | return false; |
| 5476 | } |
| 5477 | |
| 5478 | if (JSON_HEDLEY_UNLIKELY(not parse_bson_element_list(/*is_array*/true))) |
| 5479 | { |
| 5480 | return false; |
| 5481 | } |
| 5482 | |
| 5483 | return sax->end_array(); |
| 5484 | } |
| 5485 | |
| 5486 | ////////// |
| 5487 | // CBOR // |
nothing calls this directly
no test coverage detected