! @brief Reads in a BSON-object and passes it to the SAX-parser. @return whether a valid BSON-value was passed to the SAX parser */
| 7791 | @return whether a valid BSON-value was passed to the SAX parser |
| 7792 | */ |
| 7793 | bool parse_bson_internal() |
| 7794 | { |
| 7795 | std::int32_t document_size{}; |
| 7796 | get_number<std::int32_t, true>(input_format_t::bson, document_size); |
| 7797 | |
| 7798 | if (JSON_HEDLEY_UNLIKELY(!sax->start_object(std::size_t(-1)))) |
| 7799 | { |
| 7800 | return false; |
| 7801 | } |
| 7802 | |
| 7803 | if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/false))) |
| 7804 | { |
| 7805 | return false; |
| 7806 | } |
| 7807 | |
| 7808 | return sax->end_object(); |
| 7809 | } |
| 7810 | |
| 7811 | /*! |
| 7812 | @brief Parses a C-style string from the BSON input. |
nothing calls this directly
no test coverage detected