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