| 67 | } |
| 68 | |
| 69 | void jsonpatch_add_add_add_failed2() |
| 70 | { |
| 71 | json target = json::parse(R"( |
| 72 | { "foo": "bar"} |
| 73 | )"); |
| 74 | |
| 75 | json patch = json::parse(R"( |
| 76 | [ |
| 77 | { "op": "add", "path": "/baz", "value": "qux" }, |
| 78 | { "op": "add", "path": "/foo", "value": [ "bar", "baz" ] }, |
| 79 | { "op": "add", "path": "/baz/bat", "value": "qux" } // nonexistent target |
| 80 | ] |
| 81 | )"); |
| 82 | |
| 83 | std::error_code ec; |
| 84 | jsonpatch::apply_patch(target, patch, ec); |
| 85 | |
| 86 | std::cout << "(1) " << std::error_code(ec).message() << '\n'; |
| 87 | std::cout << "(2) " << target << '\n'; |
| 88 | } |
| 89 | |
| 90 | void create_a_json_patch() |
| 91 | { |
no test coverage detected