| 12327 | template<typename SAX> |
| 12328 | JSON_HEDLEY_NON_NULL(2) |
| 12329 | bool sax_parse(SAX* sax, const bool strict = true) |
| 12330 | { |
| 12331 | (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {}; |
| 12332 | const bool result = sax_parse_internal(sax); |
| 12333 | |
| 12334 | // strict mode: next byte must be EOF |
| 12335 | if (result && strict && (get_token() != token_type::end_of_input)) |
| 12336 | { |
| 12337 | return sax->parse_error(m_lexer.get_position(), |
| 12338 | m_lexer.get_token_string(), |
| 12339 | parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr)); |
| 12340 | } |
| 12341 | |
| 12342 | return result; |
| 12343 | } |
| 12344 | |
| 12345 | private: |
| 12346 | template<typename SAX> |
no test coverage detected