You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
toomim
changed the title
Range-Patch: deletion is ambiguous
JSON Range Unit: deleting field in object is ambiguous
Feb 13, 2021
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
.The text was updated successfully, but these errors were encountered: