Closed c799878 closed 11 years ago
In tests.json
WRONG { "doc": {"foo": 1}, "patch": [{"op": "add", "path": "/0", "value": "bar"}], "error": "Array operation on object target" },
RIGHT { "comment": "0 can be an array index or object element name", "doc": {"foo": 1}, "patch": [{"op": "add", "path": "/0", "value": "bar"}], "expected": {"foo": 1, "0": "bar" },
In tests.json
WRONG { "doc": {"foo": 1}, "patch": [{"op": "add", "path": "/0", "value": "bar"}], "error": "Array operation on object target" },
RIGHT { "comment": "0 can be an array index or object element name", "doc": {"foo": 1}, "patch": [{"op": "add", "path": "/0", "value": "bar"}], "expected": {"foo": 1, "0": "bar" },