gnieh/diffson

gnieh.diffson.PatchException: element 8 does not exist at path /assetMetadata/0/data/keywords

Closed this issue · 4 comments

Hi,
First off thank you for starting this project.
The call to patch(...) is throwing "gnieh.diffson.PatchException: element 8 does not exist at path /assetMetadata/0/data/keywords". I would not expect the patch(...) to fail.

Here is the test and the Json I am using follows the test.

"diff" in {
    val assetCreate = getStringFromResource("/json/asset-content.json")
    val assetUpdate = getStringFromResource("/json/asset-content-update.json")
    val patch = JsonDiff.diff(assetCreate, assetUpdate)
    println(patch)
    val result = patch(assetCreate)
    println(result)
  }

/json/asset-content.json


Hi,

Indeed it seems weird that this test fails.

What version are you using? Did you try the current snapshot version? It is published on sonatype snapshot repository as version 1.1.0-SNAPSHOT.

If it solves this problem I will release it in the coming days.

I was using 1.0.0. I tried 1.1.0-SNAPSHOT - same exception is thrown.

I will check this. Thanks for reporting.

I just published version 1.1.0 containing this fix. Thanks for reporting.