"add" replaces any existing value, instead of causing an error
c799878 opened this issue · 0 comments
c799878 commented
In tests.json
WRONG
{ "comment": "add to existing null-valued field should err",
"doc": {"foo": null},
"patch": [{"op": "add", "path": "/foo", "value":1}],
"error": "'add' target already set" },
RIGHT
{ "comment": "add replaces any existing field",
"doc": {"foo": null},
"patch": [{"op": "add", "path": "/foo", "value":1}],
"expected": {"foo": 1} },