MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / sax_parse

Method sax_parse

native/thirdpart/json/json.hpp:8802–8817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8800 template <typename SAX>
8801 JSON_HEDLEY_NON_NULL(2)
8802 bool sax_parse(SAX* sax, const bool strict = true)
8803 {
8804 (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {};
8805 const bool result = sax_parse_internal(sax);
8806
8807 // strict mode: next byte must be EOF
8808 if (result and strict and (get_token() != token_type::end_of_input))
8809 {
8810 return sax->parse_error(m_lexer.get_position(),
8811 m_lexer.get_token_string(),
8812 parse_error::create(101, m_lexer.get_position(),
8813 exception_message(token_type::end_of_input, "value")));
8814 }
8815
8816 return result;
8817 }
8818
8819 private:
8820 template <typename SAX>

Callers 5

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

Calls 4

createFunction · 0.85
get_positionMethod · 0.80
parse_errorMethod · 0.45
get_token_stringMethod · 0.45

Tested by

no test coverage detected