| 8800 | template <typename SAX> |
| 8801 | JSON_HEDLEY_NON_NULL(2) |
| 8802 | bool sax_parse(SAX* sax, const bool strict = true) |
| 8803 | { |
| 8804 | (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {}; |
| 8805 | const bool result = sax_parse_internal(sax); |
| 8806 | |
| 8807 | // strict mode: next byte must be EOF |
| 8808 | if (result and strict and (get_token() != token_type::end_of_input)) |
| 8809 | { |
| 8810 | return sax->parse_error(m_lexer.get_position(), |
| 8811 | m_lexer.get_token_string(), |
| 8812 | parse_error::create(101, m_lexer.get_position(), |
| 8813 | exception_message(token_type::end_of_input, "value"))); |
| 8814 | } |
| 8815 | |
| 8816 | return result; |
| 8817 | } |
| 8818 | |
| 8819 | private: |
| 8820 | template <typename SAX> |
no test coverage detected