MCPcopy Create free account
hub / github.com/arun11299/cpp-jwt / parse_bson_internal

Method parse_bson_internal

include/jwt/json/json.hpp:7794–7810  ·  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

7792 @return whether a valid BSON-value was passed to the SAX parser
7793 */
7794 bool parse_bson_internal()
7795 {
7796 std::int32_t document_size{};
7797 get_number<std::int32_t, true>(input_format_t::bson, document_size);
7798
7799 if (JSON_HEDLEY_UNLIKELY(!sax->start_object(std::size_t(-1))))
7800 {
7801 return false;
7802 }
7803
7804 if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/false)))
7805 {
7806 return false;
7807 }
7808
7809 return sax->end_object();
7810 }
7811
7812 /*!
7813 @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