MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / parse_bson_internal

Method parse_bson_internal

Source/Utils/json.hpp:7793–7809  ·  view source on GitHub ↗

! @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 */

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

start_objectMethod · 0.45
end_objectMethod · 0.45

Tested by

no test coverage detected