mirror of
https://github.com/nlohmann/json.git
synced 2025-07-25 13:41:56 +03:00
🔨 using the SAX-DOM parser
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user