| 10261 | template<typename SAX> |
| 10262 | JSON_HEDLEY_NON_NULL(2) |
| 10263 | bool sax_parse(SAX* sax, const bool strict = true) |
| 10264 | { |
| 10265 | (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {}; |
| 10266 | const bool result = sax_parse_internal(sax); |
| 10267 | |
| 10268 | // strict mode: next byte must be EOF |
| 10269 | if (result && strict && (get_token() != token_type::end_of_input)) |
| 10270 | { |
| 10271 | return sax->parse_error(m_lexer.get_position(), |
| 10272 | m_lexer.get_token_string(), |
| 10273 | parse_error::create(101, m_lexer.get_position(), |
| 10274 | exception_message(token_type::end_of_input, "value"))); |
| 10275 | } |
| 10276 | |
| 10277 | return result; |
| 10278 | } |
| 10279 | |
| 10280 | private: |
| 10281 | template<typename SAX> |
no test coverage detected