Conversation
|
Uh, sorry, I only just noticed this pull request... Does it also solve the other issue you mentioned? |
|
Hi, the pull request doesn't solve all cases, it solve cases covered by shared example, The whole MOVE operation needs to revisit. |
|
Hi, I have written java implementation names as zjsonpatch https://github.com/flipkart-incubator/zjsonpatch, it covers all cases which are currently missing in json-patch project. |
|
@vishwakarma which cases are missing? None are missing. JSON Patch works and so does JSON Merge Patch. And so does JSON Diff! It just doesn't optimize everything. But it works reliably. |
There was bug in factorization of diffs while finding pairs.
Example :
"first": { "b": [0, 1, 2] },
"second": { "b": [1, 2], "c": 0 ,"d":0}
patch obtained is :
{{ "op": "move", "from": "/b/0", "path": "/c"}, { "op": "move", "from": "/b/0", "path": "/d"}}
which is wrong, the correct patch generated should be
{ "op": "move", "from": "/b/0", "path": "/c"},{ "op": "add", "path": "/d", "value": 0}
There was bug in finding pair method, I have added necessary code fix for same.