| 10332 | template<typename SAX> |
| 10333 | JSON_HEDLEY_NON_NULL(2) |
| 10334 | bool sax_parse(SAX* sax, const bool strict = true) |
| 10335 | { |
| 10336 | (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {}; |
| 10337 | const bool result = sax_parse_internal(sax); |
| 10338 | |
| 10339 | // strict mode: next byte must be EOF |
| 10340 | if (result && strict && (get_token() != token_type::end_of_input)) |
| 10341 | { |
| 10342 | return sax->parse_error(m_lexer.get_position(), |
| 10343 | m_lexer.get_token_string(), |
| 10344 | parse_error::create(101, m_lexer.get_position(), |
| 10345 | exception_message(token_type::end_of_input, "value"))); |
| 10346 | } |
| 10347 | |
| 10348 | return result; |
| 10349 | } |
| 10350 | |
| 10351 | private: |
| 10352 | template<typename SAX> |
no test coverage detected