Re:What's the Difference: JSON diff and patch
by ggleason on Wednesday February 16, 2022 @04:39PM
(#30366101)
We use JSON-patch/diff internally for our rebase operation. We looked at implementing it on rfc6902 but it turned out to be awkward because of the path descriptions, and insufficiently rich for the kinds of patches that we needed. We could have extended rfc6902 but then we'd be in the embrace / extend / destroy pattern no?
[ Parent
| on HN ]
Re:What's the Difference: JSON diff and patch
by jsmith45 on Wednesday February 16, 2022 @06:46PM
(#30367490)
Yeah RFC6902 works best when you are only trying to create patches that are safe to apply to exactly the expected document.
You potentially need much more for some scenarios where you could be applying a patch to a previously modified document. It has some limited support for some common operations for these, but quite far from everything that could be useful. But it is also true that they needed to put the limit somewhere, and where they stopped is reasonable for a fair few scenarios, but certainly not every possible one.