MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / sax_parse

Method sax_parse

include/behaviortree_cpp/contrib/json.hpp:12329–12343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12327 template<typename SAX>
12328 JSON_HEDLEY_NON_NULL(2)
12329 bool sax_parse(SAX* sax, const bool strict = true)
12330 {
12331 (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {};
12332 const bool result = sax_parse_internal(sax);
12333
12334 // strict mode: next byte must be EOF
12335 if (result && strict && (get_token() != token_type::end_of_input))
12336 {
12337 return sax->parse_error(m_lexer.get_position(),
12338 m_lexer.get_token_string(),
12339 parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr));
12340 }
12341
12342 return result;
12343 }
12344
12345 private:
12346 template<typename SAX>

Callers 10

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_bjdataFunction · 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