From f10026912ad8e0975e6c641f68f8481b69cfe56e Mon Sep 17 00:00:00 2001 From: 44DD Date: Fri, 11 Oct 2019 13:34:51 +0200 Subject: [PATCH] Fix non-compilable code example in README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index afbf0f7..9d6ceb3 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ See also `app/json-schema-validate.cpp`. ```C++ #include +#include #include "json-schema.hpp" @@ -177,10 +178,11 @@ int main() /* json-parse the people - with custom error handler */ class custom_error_handler : public nlohmann::json_schema::basic_error_handler { - void error(const std::string &path, const json &instance, const std::string &message) override + void error(const nlohmann::json_pointer> &pointer, const json &instance, + const std::string &message) override { - nlohmann::json_schema::basic_error_handler::error(path, instance, message); - std::cerr << "ERROR: '" << path << "' - '" << instance << "': " << message << "\n"; + nlohmann::json_schema::basic_error_handler::error(pointer, instance, message); + std::cerr << "ERROR: '" << pointer << "' - '" << instance << "': " << message << "\n"; } };