! @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 */
| 8009 | @return whether a valid BSON-array was passed to the SAX parser |
| 8010 | */ |
| 8011 | bool parse_bson_array() |
| 8012 | { |
| 8013 | std::int32_t document_size{}; |
| 8014 | get_number<std::int32_t, true>(input_format_t::bson, document_size); |
| 8015 | |
| 8016 | if (JSON_HEDLEY_UNLIKELY(!sax->start_array(std::size_t(-1)))) |
| 8017 | { |
| 8018 | return false; |
| 8019 | } |
| 8020 | |
| 8021 | if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/true))) |
| 8022 | { |
| 8023 | return false; |
| 8024 | } |
| 8025 | |
| 8026 | return sax->end_array(); |
| 8027 | } |
| 8028 | |
| 8029 | ////////// |
| 8030 | // CBOR // |
nothing calls this directly
no test coverage detected