json-diff icon indicating copy to clipboard operation
json-diff copied to clipboard

The returned result is not as expected

Open DIHE-GitHub opened this issue 2 years ago • 2 comments

Code to reproduce the problem: diff-err.zip Run npm run start to get the following output:

Output:

unexpect-> [
  [
    "~",
    {
      "holes": [
        [
          " "
        ],
        [
          "-",
          {
            "depth": 11.5,
            "diameter": 8,
            "start": {
              "x": 218,
              "y": 241,
              "z": 9
            },
            "end": {
              "x": 220,
              "y": 241,
              "z": -2.5
            },
            "plankFaceId": "0",
            "name": "短木销_修改",
            "type": "PLANK"
          }
        ],
        [
          "+",
          {
            "depth": 11.5,
            "diameter": 8,
            "start": {
              "x": 218,
              "y": 241,
              "z": 9
            },
            "end": {
              "x": 218,
              "y": 241,
              "z": -2.5
            },
            "plankFaceId": "0",
            "name": "短木销",
            "type": "PLANK"
          }
        ]
      ]
    }
  ]
]
expect-> [
  [
    "~",
    {
      "holes": [
        [
          " "
        ],
        [
          "~",
          {
            "end": {
              "x": {
                "__old": 220,
                "__new": 218
              }
            },
            "name": {
              "__old": "短木销_修改",
              "__new": "短木销"
            }
          }
        ]
      ]
    }
  ]
]

DIHE-GitHub avatar Dec 23 '22 10:12 DIHE-GitHub

Is this a mistake? Or am I using it in the wrong way?

DIHE-GitHub avatar Dec 29 '22 07:12 DIHE-GitHub

@DIHE-GitHub -- it's a bug, thanks for reporting it. I'm looking into it.

ewoudenberg avatar Feb 12 '23 23:02 ewoudenberg