MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / sax_parse

Method sax_parse

Source/Utils/json.hpp:10263–10278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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>

Callers 9

sax_parseFunction · 0.80
basic_json from_cborFunction · 0.80
from_cborFunction · 0.80
basic_json from_msgpackFunction · 0.80
from_msgpackFunction · 0.80
basic_json from_ubjsonFunction · 0.80
from_ubjsonFunction · 0.80
basic_json from_bsonFunction · 0.80
from_bsonFunction · 0.80

Calls 3

createFunction · 0.85
get_token_stringMethod · 0.80
parse_errorMethod · 0.45

Tested by

no test coverage detected