Update rapidjson_utils.hpp to use iterative parsing

This commit is contained in:
Tristan Penman 2021-01-07 21:34:51 +11:00
parent f544cd020a
commit 3621f98d43

View File

@ -20,7 +20,7 @@ inline bool loadDocument(const std::string &path, rapidjson::GenericDocument<Enc
} }
// Parse schema // Parse schema
document.template Parse<0>(file.c_str()); document.template Parse<rapidjson::kParseIterativeFlag>(file.c_str());
if (document.HasParseError()) { if (document.HasParseError()) {
std::cerr << "RapidJson failed to parse the document:" << std::endl; std::cerr << "RapidJson failed to parse the document:" << std::endl;
std::cerr << "Parse error: " << document.GetParseError() << std::endl; std::cerr << "Parse error: " << document.GetParseError() << std::endl;