| 12261 | template<typename SAX> |
| 12262 | JSON_HEDLEY_NON_NULL(2) |
| 12263 | bool sax_parse(SAX* sax, const bool strict = true) |
| 12264 | { |
| 12265 | (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {}; |
| 12266 | const bool result = sax_parse_internal(sax); |
| 12267 | |
| 12268 | // strict mode: next byte must be EOF |
| 12269 | if (result && strict && (get_token() != token_type::end_of_input)) |
| 12270 | { |
| 12271 | return sax->parse_error(m_lexer.get_position(), |
| 12272 | m_lexer.get_token_string(), |
| 12273 | parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr)); |
| 12274 | } |
| 12275 | |
| 12276 | return result; |
| 12277 | } |
| 12278 | |
| 12279 | private: |
| 12280 | template<typename SAX> |
no test coverage detected