With the JSON Range Unit, the deletion of a field on a JSON object (e.g. delete foo.bar) is currently ambiguous:
A patch with empty contents corresponds to deletion of existing
content at the specified range. A patch with a zero-length range but
non-empty contents corresponds to inserting content immediately
before the location of the zero-length range. A patch with non-empty
contents at a non-zero-length range corresponds to replacing existing
content at the range with new content.
It's ambiguous whether "empty contents" refers to an empty string/array (such as "" and []) or an actually zero-length body (with Content-Length: 0). If you are deleting a portion of a string or array, it makes sense to replace that portion with a zero-length string or array. But if you are deleting a field from a JSON object, then it makes more sense to use Content-Length: 0.
With the JSON Range Unit, the deletion of a field on a JSON object (e.g.
delete foo.bar
) is currently ambiguous:It's ambiguous whether "empty contents" refers to an empty string/array (such as
""
and[]
) or an actually zero-length body (withContent-Length: 0
). If you are deleting a portion of a string or array, it makes sense to replace that portion with a zero-length string or array. But if you are deleting a field from a JSON object, then it makes more sense to useContent-Length: 0
.