8483 {
8485 bool result = false;
8486
8487 switch (format)
8488 {
8489 case input_format_t::bson:
8491 break;
8492
8493 case input_format_t::cbor:
8495 break;
8496
8497 case input_format_t::msgpack:
8499 break;
8500
8501 case input_format_t::ubjson:
8503 break;
8504
8505 case input_format_t::json:
8506 default:
8507 JSON_ASSERT(false);
8508 }
8509
8510
8511 if (result && strict)
8512 {
8513 if (format == input_format_t::ubjson)
8514 {
8516 }
8517
8518 else
8519 {
8521 }
8522
8523 if (JSON_HEDLEY_UNLIKELY(
current != std::char_traits<char_type>::eof()))
8524 {
8527 }
8528 }
8529
8530 return result;
8531 }
char_int_type get_ignore_noop()
bool parse_cbor_internal(const bool get_char, const cbor_tag_handler_t tag_handler)
bool parse_ubjson_internal(const bool get_char=true)
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 parse_bson_internal()
Reads in a BSON-object and passes it to the SAX-parser.
char_int_type get()
get next character from the input
bool parse_msgpack_internal()
static parse_error create(int id_, const position_t &pos, const std::string &what_arg, const BasicJsonType &context)
create a parse error exception