MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / get_bson_string

Method get_bson_string

native/thirdpart/json/json.hpp:5339–5348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5337 */
5338 template<typename NumberType>
5339 bool get_bson_string(const NumberType len, string_t& result)
5340 {
5341 if (JSON_HEDLEY_UNLIKELY(len < 1))
5342 {
5343 auto last_token = get_token_string();
5344 return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bson, "string length must be at least 1, is " + std::to_string(len), "string")));
5345 }
5346
5347 return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) and get() != std::char_traits<char>::eof();
5348 }
5349
5350 /*!
5351 @brief Read a BSON document element of the given @a element_type.

Callers

nothing calls this directly

Calls 4

createFunction · 0.85
to_stringFunction · 0.85
getFunction · 0.85
parse_errorMethod · 0.45

Tested by

no test coverage detected