MCPcopy Create free account
hub / github.com/AllentDan/LibtorchTutorials / parse_bson_array

Method parse_bson_array

lesson6-Segmentation/json.hpp:8012–8028  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

start_arrayMethod · 0.45
end_arrayMethod · 0.45

Tested by

no test coverage detected