-
Notifications
You must be signed in to change notification settings - Fork 153
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
Wrong Path when comparing Lists #134
Comments
@upsidedownsmile The behaviour is correct. JsonPatch is applied "step by step". If you debug it like so, you get:
|
Thanks for the explanation, I didn't know that it worked like that. But, according to the README:
If we include The path is not consistent with what is in the README. I understand that is works the same way as you explained, but is there a way to get the value that was moved? (the only way that I found was to call |
Expected Behavior
When comparing these 2 lists it is expected 4 changes:
1 - "c" was added, path is "/0"
2 - "b" was added, path is "/1"
3 - "b" was removed, path was "/1"
4 - "c" was removed, path was "/2"
Actual Behavior
Instead, I'm getting this:
1 - "c" was added, path is "/0"
2 - "b" was added, path is "/1"
3 - "b" was removed, path was "/3"
4 - "c" was removed, path was "/3"
Steps to Reproduce the Problem
Library Version:
zjsonpatch version: 0.4.11
java version: 1.8
The text was updated successfully, but these errors were encountered: