
RFC 7396 – JSON Merge Patch - ainar-g
https://tools.ietf.org/html/rfc7396
======
avoidwork
Why not JSON Patch?
[https://tools.ietf.org/html/rfc6902](https://tools.ietf.org/html/rfc6902)

~~~
ainar-g
IMHO:

* Merge Patch better reflects the practices that people are already using today.

* RFC 6902 is over-engineered and less understandable.

* RFC 6902 requires more space.

* RFC 6902 requires another RFC[1] to work. RFC 6901 - JSON Pointer...

* ... which doesn't reflect the current practice either. I've never seen people use the 'a/b/c' notation. It's always 'a.b.c', because that's how you access it in JS.

[1] [https://tools.ietf.org/html/rfc6901](https://tools.ietf.org/html/rfc6901)

~~~
avoidwork
6901 is very similiar to XML XPath*,
[https://www.w3.org/TR/xpath-31/](https://www.w3.org/TR/xpath-31/).

JSON Patch can be MVCC ops to apply to an object, where as a JSON Merge Patch
is overrides?

" There are a few things to note about the function. If the patch is anything
other than an object, the result will always be to replace the entire target
with the entire patch. Also, it is not possible to patch part of a target that
is not an object, such as to replace just some of the values in an array."

I don't see how that's better. I'm legitimately asking as I've implemented
JSON Patch support in API gateways due to the "over-engineered" & useful
applications in real life.

