Skip to content

Generator generates wrong JSON patch #155

Open
@petr-ujezdsky

Description

@petr-ujezdsky

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions