! @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 */
| 9240 | @return whether a valid BSON-value was passed to the SAX parser |
| 9241 | */ |
| 9242 | bool parse_bson_internal() |
| 9243 | { |
| 9244 | std::int32_t document_size{}; |
| 9245 | get_number<std::int32_t, true>(input_format_t::bson, document_size); |
| 9246 | |
| 9247 | if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast<std::size_t>(-1)))) |
| 9248 | { |
| 9249 | return false; |
| 9250 | } |
| 9251 | |
| 9252 | if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/false))) |
| 9253 | { |
| 9254 | return false; |
| 9255 | } |
| 9256 | |
| 9257 | return sax->end_object(); |
| 9258 | } |
| 9259 | |
| 9260 | /*! |
| 9261 | @brief Parses a C-style string from the BSON input. |
nothing calls this directly
no test coverage detected