1
0
mirror of https://github.com/nlohmann/json synced 2024-09-20 06:40:13 +00:00

📝 fix example

This commit is contained in:
Niels Lohmann 2020-05-12 16:27:55 +02:00
parent e9a845f08a
commit 52f5f3d29f
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69

View File

@ -79,6 +79,12 @@ class sax_event_consumer : public json::json_sax_t
return true;
}
bool binary(binary_t& val) override
{
events.push_back("binary");
return true;
}
bool parse_error(std::size_t position, const std::string& last_token, const json::exception& ex) override
{
events.push_back("error: " + std::string(ex.what()));