Open NikolayMakhonin opened 5 years ago
Version 2.0.7
jsonpatch.compare([1,2,3,4,5,6,7,8], [1,2,3,4,0,5,6,7,8])
0: {op: "replace", path: "/7", value: 7} 1: {op: "replace", path: "/6", value: 6} 2: {op: "replace", path: "/5", value: 5} 3: {op: "replace", path: "/4", value: 0} 4: {op: "add", path: "/8", value: 8}
For comparison: https://chbrown.github.io/rfc6902/
rfc6902.createPatch([1,2,3,4,5,6,7,8], [1,2,3,4,0,5,6,7,8]);
0: { "op": "add", "path": "/4", "value": 0 }
Version 2.0.7
jsonpatch.compare([1,2,3,4,5,6,7,8], [1,2,3,4,0,5,6,7,8])
0: {op: "replace", path: "/7", value: 7} 1: {op: "replace", path: "/6", value: 6} 2: {op: "replace", path: "/5", value: 5} 3: {op: "replace", path: "/4", value: 0} 4: {op: "add", path: "/8", value: 8}
For comparison: https://chbrown.github.io/rfc6902/
rfc6902.createPatch([1,2,3,4,5,6,7,8], [1,2,3,4,0,5,6,7,8]);
0: { "op": "add", "path": "/4", "value": 0 }