when I run the follow case with [python-json-patch](https://github.com/stefankoegl/python-json-patch), it failed. Detail in https://github.com/stefankoegl/python-json-patch/issues/111#issue-623600326. But when I change the `add` operation to `replace`, it succeeded. https://github.com/json-patch/json-patch-tests/blob/ea3af85790cb72893d0676597814b7532019c24e/tests.json#L63-L66
Activity
jayvdb commentedon Aug 15, 2023
A path of "" means the root, or whole document.
See https://datatracker.ietf.org/doc/html/rfc6901#section-5
The fact "add" to the whole document does a replace is covered by this part of the json-patch spec
https://datatracker.ietf.org/doc/html/rfc6902/#section-4.1
The root exists, so it becomes a replace op