diff --git a/src/json.hpp b/src/json.hpp index b7a6f64a8..0a1db1c32 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -9612,7 +9612,7 @@ basic_json_parser_63: // collect mandatory members const std::string op = get_value("op", "op", true); const std::string path = get_value(op, "path", true); - json_pointer ptr(get_value(op, "path", true)); + json_pointer ptr(path); if (op == "add") { diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index c4c87f5de..52d76148c 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -8922,7 +8922,7 @@ class basic_json // collect mandatory members const std::string op = get_value("op", "op", true); const std::string path = get_value(op, "path", true); - json_pointer ptr(get_value(op, "path", true)); + json_pointer ptr(path); if (op == "add") {