Merge pull request #1469 from garethsb-sony/json_pointer-append

Add operator/= and operator/ to construct a JSON pointer by appending two JSON pointers
This commit is contained in:
Niels Lohmann 2019-03-11 22:47:08 +01:00 committed by GitHub
commit c983b67112
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 238 additions and 26 deletions

View file

@ -7493,7 +7493,7 @@ class basic_json
const auto operation_add = [&result](json_pointer & ptr, basic_json val)
{
// adding to the root of the target document means replacing it
if (ptr.is_root())
if (ptr.empty())
{
result = val;
}