TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ sax_parse()

template<typename BasicJsonType , typename InputAdapterType >
template<typename SAX >
bool nlohmann::detail::parser< BasicJsonType, InputAdapterType >::sax_parse ( SAX *  sax,
const bool  strict = true 
)
inline

Definition at line 11157 of file json.hpp.

11158 {
11159 (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {};
11160 const bool result = sax_parse_internal(sax);
11161
11162 // strict mode: next byte must be EOF
11163 if (result && strict && (get_token() != token_type::end_of_input))
11164 {
11165 return sax->parse_error(m_lexer.get_position(),
11167 parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), BasicJsonType()));
11168 }
11169
11170 return result;
11171 }
constexpr position_t get_position() const noexcept
return position of last read token
Definition: json.hpp:8045
std::string get_token_string() const
return the last read token (for errors only).
Definition: json.hpp:8053
static parse_error create(int id_, const position_t &pos, const std::string &what_arg, const BasicJsonType &context)
create a parse error exception
Definition: json.hpp:2800
lexer_t m_lexer
the lexer
Definition: json.hpp:11506
token_type get_token()
get next token from lexer
Definition: json.hpp:11465