This has the smell of NP completeness.
May be, I didn't (and won't) spend much time considering.
To solve the basic problem of creating any patch for a pair of random JSON documents, a quite relatively simple-minded diff-style algorithm should do the job. Very likely, the patch won't be the smallest possible patch in all cases, and it won't be elegant at all. But that approach has proven to work quite well for the last 43 years for all kind of text files, and especially for source code.
Alexander
In reply to Re^6: Create JSON patch (updated)
by afoken
in thread Create JSON patch
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |