Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix optimizing list insertion/deletion diffs #83

Open
aeckert opened this issue Mar 15, 2018 · 0 comments
Open

Fix optimizing list insertion/deletion diffs #83

aeckert opened this issue Mar 15, 2018 · 0 comments

Comments

@aeckert
Copy link

aeckert commented Mar 15, 2018

python-json-patch/tests.py

Lines 329 to 338 in 7b664c4

# TODO: this test is currently disabled, as the optimized patch is
# not ideal
def _test_should_just_add_new_item_not_rebuild_all_list(self):
src = {'foo': [1, 2, 3]}
dst = {'foo': [3, 1, 2, 3]}
patch = list(jsonpatch.make_patch(src, dst))
self.assertEqual(len(patch), 1)
self.assertEqual(patch[0]['op'], 'add')
res = jsonpatch.apply_patch(src, patch)
self.assertEqual(res, dst)

Is there ongoing work to fix this issue? This lib is much nicer than alternatives, but the sub-optimal diffing makes it unusable for my use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant