jsonpath - JSON-Patch 'remove' with empty path - What is the official, standard outcome? -
what standard outcome of following 'remove' json patch empty ""
path?
[{ "op": "remove", "path": ""}]
should clear whole object, equal assigning {}
? in http://jsonpatch.com/ says: to point root of document use empty string pointer. guess 'remove' on root removes whole object, right?
i tried 2 different json patch libraries 2 different results:
- https://github.com/java-json-tools/json-patch: deletes whole object
- https://github.com/gnieh/diffson: throws jsresultexception
what officially accepted, standard outcome of this? checked in rfc json patch (https://tools.ietf.org/html/rfc6902) couldn't find anything.
Comments
Post a Comment