parse_error::create(110,chars_read,exception_message(format,"expected end of input; last byte: 0x"+get_token_string(),"value"),diagnostics_t()));
parse_error::create(110,chars_read,exception_message(format,"expected end of input; last byte: 0x"+get_token_string(),"value"),BasicJsonType()));
}
}
...
...
@@ -215,7 +213,7 @@ class binary_reader
if(JSON_HEDLEY_UNLIKELY(len<1))
{
autolast_token=get_token_string();
returnsax->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"),diagnostics_t()));
returnsax->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"),BasicJsonType()));
returnsax->parse_error(chars_read,last_token,parse_error::create(112,chars_read,exception_message(input_format_t::bson,"byte array length cannot be negative, is "+std::to_string(len),"binary"),diagnostics_t()));
returnsax->parse_error(chars_read,last_token,parse_error::create(112,chars_read,exception_message(input_format_t::bson,"byte array length cannot be negative, is "+std::to_string(len),"binary"),BasicJsonType()));
returnsax->parse_error(element_type_parse_position,std::string(cr.data()),parse_error::create(114,element_type_parse_position,"Unsupported BSON record type 0x"+std::string(cr.data()),diagnostics_t()));
returnsax->parse_error(element_type_parse_position,std::string(cr.data()),parse_error::create(114,element_type_parse_position,"Unsupported BSON record type 0x"+std::string(cr.data()),BasicJsonType()));
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::cbor,"expected length specification (0x60-0x7B) or indefinite string type (0x7F); last byte: 0x"+last_token,"string"),diagnostics_t()));
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::cbor,"expected length specification (0x60-0x7B) or indefinite string type (0x7F); last byte: 0x"+last_token,"string"),BasicJsonType()));
}
}
}
...
...
@@ -1027,7 +1025,7 @@ class binary_reader
default:
{
autolast_token=get_token_string();
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::cbor,"expected length specification (0x40-0x5B) or indefinite binary array type (0x5F); last byte: 0x"+last_token,"binary"),diagnostics_t()));
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::cbor,"expected length specification (0x40-0x5B) or indefinite binary array type (0x5F); last byte: 0x"+last_token,"binary"),BasicJsonType()));
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::msgpack,"expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0x"+last_token,"string"),diagnostics_t()));
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::msgpack,"expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0x"+last_token,"string"),BasicJsonType()));
}
}
}
...
...
@@ -1826,7 +1824,7 @@ class binary_reader
default:
autolast_token=get_token_string();
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::ubjson,"expected length type specification (U, i, I, l, L); last byte: 0x"+last_token,"string"),diagnostics_t()));
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::ubjson,"expected length type specification (U, i, I, l, L); last byte: 0x"+last_token,"string"),BasicJsonType()));
}
}
...
...
@@ -1896,7 +1894,7 @@ class binary_reader
default:
{
autolast_token=get_token_string();
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::ubjson,"expected length type specification (U, i, I, l, L) after '#'; last byte: 0x"+last_token,"size"),diagnostics_t()));
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::ubjson,"expected length type specification (U, i, I, l, L) after '#'; last byte: 0x"+last_token,"size"),BasicJsonType()));
}
}
}
...
...
@@ -1934,7 +1932,7 @@ class binary_reader
returnfalse;
}
autolast_token=get_token_string();
returnsax->parse_error(chars_read,last_token,parse_error::create(112,chars_read,exception_message(input_format_t::ubjson,"expected '#' after type information; last byte: 0x"+last_token,"size"),diagnostics_t()));
returnsax->parse_error(chars_read,last_token,parse_error::create(112,chars_read,exception_message(input_format_t::ubjson,"expected '#' after type information; last byte: 0x"+last_token,"size"),BasicJsonType()));
}
returnget_ubjson_size_value(result.first);
...
...
@@ -2024,7 +2022,7 @@ class binary_reader
if(JSON_HEDLEY_UNLIKELY(current>127))
{
autolast_token=get_token_string();
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::ubjson,"byte after 'C' must be in range 0x00..0x7F; last byte: 0x"+last_token,"char"),diagnostics_t()));
returnsax->parse_error(chars_read,last_token,parse_error::create(113,chars_read,exception_message(input_format_t::ubjson,"byte after 'C' must be in range 0x00..0x7F; last byte: 0x"+last_token,"char"),BasicJsonType()));
returnsax->parse_error(chars_read,number_string,parse_error::create(115,chars_read,exception_message(input_format_t::ubjson,"invalid number text: "+number_lexer.get_token_string(),"high-precision number"),diagnostics_t()));
returnsax->parse_error(chars_read,number_string,parse_error::create(115,chars_read,exception_message(input_format_t::ubjson,"invalid number text: "+number_lexer.get_token_string(),"high-precision number"),BasicJsonType()));
returnsax->parse_error(chars_read,number_string,parse_error::create(115,chars_read,exception_message(input_format_t::ubjson,"invalid number text: "+number_lexer.get_token_string(),"high-precision number"),diagnostics_t()));
returnsax->parse_error(chars_read,number_string,parse_error::create(115,chars_read,exception_message(input_format_t::ubjson,"invalid number text: "+number_lexer.get_token_string(),"high-precision number"),BasicJsonType()));
JSON_THROW(out_of_range::create(407,"integer number "+std::to_string(j.m_value.number_unsigned)+" cannot be represented by BSON as it does not fit int64",diagnostics_t(j)));
JSON_THROW(out_of_range::create(407,"integer number "+std::to_string(j.m_value.number_unsigned)+" cannot be represented by BSON as it does not fit int64",j));