Skip to content

Commit a27a73c

Browse files
author
Mike McCabe
committed
'add' should replace existing value, not err. Fixes #1.
1 parent f4962be commit a27a73c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
"patch": [],
2525
"expected": {"foo":{"bar":2, "foo": 1}} },
2626

27-
{ "comment": "add to existing null-valued field should err",
27+
{ "comment": "add replaces any existing field",
2828
"doc": {"foo": null},
2929
"patch": [{"op": "add", "path": "/foo", "value":1}],
30-
"error": "'add' target already set" },
30+
"expected": {"foo": 1} },
3131

3232
{ "comment": "toplevel array",
3333
"doc": [],

0 commit comments

Comments
 (0)