mirror of
https://github.com/json-c/json-c.git
synced 2026-11-09 23:40:14 +08:00
pass the add flag to the array callback for json_patch copy
This commit is contained in:
1 parent
0f8fe5dd53
commit
46f0355925
3 files changed
+13
-1
No files matched your search
@@ -386,6 +386,11 @@
|
||||
"expected": {"foo": [null, null]},
|
||||
"comment": "null value should be valid array element to be copied" },
|
||||
|
||||
{ "doc": {"foo": [1, 2, 3]},
|
||||
"patch": [{"op": "copy", "from": "/foo/0", "path": "/foo/1"}],
|
||||
"expected": {"foo": [1, 1, 2, 3]},
|
||||
"comment": "copy to an array index inserts, it does not replace" },
|
||||
|
||||
{ "doc": {"foo": [null, 1]},
|
||||
"patch": [{"op": "remove", "path": "/foo/0"}],
|
||||
"expected": {"foo": [1]},
|
||||
|
||||
Reference in new issue
Block a user