mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
🐛 proper JSON Pointer escape in diagnostic messages
This commit is contained in:
@ -8651,7 +8651,7 @@ class basic_json
|
||||
for (auto it = source.cbegin(); it != source.cend(); ++it)
|
||||
{
|
||||
// escape the key name to be used in a JSON patch
|
||||
const auto key = json_pointer::escape(it.key());
|
||||
const auto key = detail::escape(it.key());
|
||||
|
||||
if (target.find(it.key()) != target.end())
|
||||
{
|
||||
@ -8675,7 +8675,7 @@ class basic_json
|
||||
if (source.find(it.key()) == source.end())
|
||||
{
|
||||
// found a key that is not in this -> add it
|
||||
const auto key = json_pointer::escape(it.key());
|
||||
const auto key = detail::escape(it.key());
|
||||
result.push_back(
|
||||
{
|
||||
{"op", "add"}, {"path", path + "/" + key},
|
||||
|
Reference in New Issue
Block a user