11089 {
11091 {
11093 sax_parse_internal(&sdp);
11094
11095
11096 if (strict && (
get_token() != token_type::end_of_input))
11097 {
11101 exception_message(token_type::end_of_input, "value"), BasicJsonType()));
11102 }
11103
11104
11105 if (sdp.is_errored())
11106 {
11108 return;
11109 }
11110
11111
11112
11113 if (result.is_discarded())
11114 {
11115 result = nullptr;
11116 }
11117 }
11118
11119 else
11120 {
11122 sax_parse_internal(&sdp);
11123
11124
11125 if (strict && (
get_token() != token_type::end_of_input))
11126 {
11130 }
11131
11132
11133 if (sdp.is_errored())
11134 {
11136 return;
11137 }
11138 }
11139
11140 result.assert_invariant();
11141 }
constexpr position_t get_position() const noexcept
return position of last read token
std::string get_token_string() const
return the last read token (for errors only).
static parse_error create(int id_, const position_t &pos, const std::string &what_arg, const BasicJsonType &context)
create a parse error exception
token_type get_token()
get next token from lexer
const parser_callback_t< BasicJsonType > callback
callback function
const bool allow_exceptions
whether to throw exceptions in case of errors
@ discarded
discarded by the parser callback function