Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Consecutive similar array elements confuse boundary correction #13

Closed
algesten opened this Issue · 0 comments

1 participant

Martin Algesten
Martin Algesten
Owner

Thanks to Daniel Gardner for reporting.

i = {'a': [{'b': [1], 'c': 'x'}]}

j1 = {'a': [{'b': [1], 'c': 'x'}, {'b': [1], 'c': 'x'}]}

j2 = {'a': [{'b': [1], 'c': 'x'}, {'b': [1], 'c': 'y'}]}

// incorrect - adds an extra element to the end of the array b
diff(i, j1) == u'{"~a[0]":{"b[+0]":1,"c":"x"},"a[+1]":{"b":[1],"c":"x"}}'

// when I make the c dictionary value different (x -> y) the diff is correct
diff(i, j2) == u'{"a[+1]":{"b":[1],"c":"y"}}'
Martin Algesten algesten closed this in 11e18d2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.