In the optimized UBJSON format, a type and a size can be provided to allow for a more compact representation.
10389 {
10390 result.first = string_t::npos;
10391 result.second = 0;
10393
10395 {
10396 result.second =
get();
10397
10398 if (JSON_HEDLEY_UNLIKELY(!
unexpect_eof(input_format_t::ubjson,
"type")))
10399 {
10400 return false;
10401 }
10402
10404
10405 if (JSON_HEDLEY_UNLIKELY(
current !=
'#'))
10406 {
10407 if (JSON_HEDLEY_UNLIKELY(!
unexpect_eof(input_format_t::ubjson,
"value")))
10408 {
10409 return false;
10410 }
10411
10414 }
10415
10417 }
10418
10420 {
10422 }
10423
10424 return true;
10425 }
char_int_type get_ignore_noop()
bool unexpect_eof(const input_format_t format, const char *context) const
std::string get_token_string() const
std::string exception_message(const input_format_t format, const std::string &detail, const std::string &context) const
std::size_t chars_read
the number of characters read
char_int_type current
the current character
json_sax_t * sax
the SAX parser
bool get_ubjson_size_value(std::size_t &result)
char_int_type get()
get next character from the input
static parse_error create(int id_, const position_t &pos, const std::string &what_arg, const BasicJsonType &context)
create a parse error exception