jack e1a2621c78 update | %!s(int64=2) %!d(string=hai) anos | |
---|---|---|
.. | ||
.bower.json | %!s(int64=2) %!d(string=hai) anos | |
LICENSE | %!s(int64=2) %!d(string=hai) anos | |
README.md | %!s(int64=2) %!d(string=hai) anos | |
json-diff.js | %!s(int64=2) %!d(string=hai) anos | |
test.js | %!s(int64=2) %!d(string=hai) anos |
Create RFC 6902 style patches between JSON objects.
For example, json_diff({a: [9, 7]}, {a: [9, 8, 7]})
results in
[{op: 'add', path: '/a/1', value: 8}]
.
No cyclic references are allowed in the objects being compared. The algorithm computes differences between arrays in a way similar to the diff utility, so it will become slow for large arrays of complex objects.