| 7915 | */ |
| 7916 | template<typename NumberType> |
| 7917 | bool get_bson_string(const NumberType len, string_t& result) |
| 7918 | { |
| 7919 | if (JSON_HEDLEY_UNLIKELY(len < 1)) |
| 7920 | { |
| 7921 | auto last_token = get_token_string(); |
| 7922 | 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"))); |
| 7923 | } |
| 7924 | |
| 7925 | return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) && get() != std::char_traits<char_type>::eof(); |
| 7926 | } |
| 7927 | |
| 7928 | /*! |
| 7929 | @brief Parses a byte array input of length @a len from the BSON input. |
nothing calls this directly
no test coverage detected