🔨 using the SAX-DOM parser

This commit is contained in:
Niels Lohmann 2018-03-06 18:17:07 +01:00
parent faf2546a15
commit 5beab80553
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
6 changed files with 173 additions and 166 deletions

View file

@ -148,9 +148,10 @@ json parser_helper(const std::string& s)
CHECK_NOTHROW(json::parser(nlohmann::detail::input_adapter(s), nullptr, false).parse(true, j_nothrow));
CHECK(j_nothrow == j);
nlohmann::json_sax_dom_parser<json> sdp;
json j_sax;
nlohmann::json_sax_dom_parser<json> sdp(j_sax);
json::sax_parse(s, &sdp);
CHECK(sdp.get_value() == j);
CHECK(j_sax == j);
return j;
}