How would you suggest this task is approached?
The challenge as i see it is in presenting diff information intelligently. Before i go reinventing the wheel, is there
I had a similar problem and ended up writing my own library:
https://github.com/algesten/jsondiff
It does both diffing/patching.
Diffs are JSON-objects themselves and have a simple syntax for object merge/replace and array insert/replace.
Example:
original
{
a: { b: 42 }
}
patch
{
"~a": { c: 43 }
}
The ~ indicates an object merge.
result
{
a: { b: 42, c: 43 }
}