To play devil’s advocate: Is this format really necessary? From the draft:

>    The HTTP PATCH [RFC5789] specification extends HTTP with a new method
>    to perform partial modifications to resources.  A JSON-based patch
>    document type is required to modify JSON documents using this method.

That’s not strictly true. A generic delta format such as xdelta3 or zdelta can 
be used to patch any type of resource at all (and frequently is, in apps like 
software updaters.)

I can see that an advantage of JSON Patch is that, since it describes 
structural changes rather than byte-level changes, it works even if the 
physical representation of the JSON changes (i.e. modifications to whitespace 
or Unicode character encoding.)

I’m just unsure whether that’s a significant enough advantage to outweigh the 
drawbacks, including:

- Much more verbose than xdelta3 or zdelta
- More CPU-expensive to patch
- Requires new software to generate and apply patches, rather than using 
existing delta libraries
- Has no error checking, so version mismatches could result in uncaught 
document corruption

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to