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

Generator generates wrong JSON patch #155

Open
petr-ujezdsky opened this issue Nov 1, 2023 · 0 comments
Open

Generator generates wrong JSON patch #155

petr-ujezdsky opened this issue Nov 1, 2023 · 0 comments

Comments

@petr-ujezdsky
Copy link

I have found two objects A and B, where generating patch to change A -> B and applying it back to A creates object different to B.

Steps to reproduce

  1. Create patch A.json -> B.json
  2. Apply this patch to object A to get object Ap (A patched)

Actual result

Ap is different from B. See diff:
Snímek obrazovky 2023-11-01 v 15 36 05

What you expect

Ap to be the same as B.

I have also used different libraries to check the step 2 (applying the patch) and that part looks OK. So the problem is somewhere in the patch generator.

This is very nasty bug because the patch is technically valid. Applying it produces object with the correct data model, but it contains wrong data.

@petr-ujezdsky petr-ujezdsky changed the title Wrong JSON patch Generator generates wrong JSON patch Nov 1, 2023
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