Closed dolphin278 closed 10 years ago
A little weird thing — if you have property named list that is an array, jsondiff-js does not generates differences for them:
list
jsondiff.diff( { a: 1, list: [1,2,3]}, { b: 'abc', list: [123]} )
produces
[ { op: 'add', path: '/b', value: 'abc' }, { op: 'remove', path: '/a' } ]
and if we rename list to just l everything works just fine:
l
jsondiff.diff( { a: 1, l: [1,2,3]}, { b: 'abc', l: [123]} )
[ { op: 'add', path: '/b', value: 'abc' }, { op: 'remove', path: '/a' }, { op: 'remove', path: '/l/1' }, { op: 'remove', path: '/l/2' }, { op: 'replace', path: '/l/0', value: 123 } ]
A little weird thing — if you have property named
list
that is an array, jsondiff-js does not generates differences for them:produces
and if we rename
list
to justl
everything works just fine:produces