...
# | Issue | Notes | Decision |
---|---|---|---|
1 | Add or Delete leaves handle as UPDATE or ADD/DELETE? | The delta report proposed follows the Json Patch format of representing the differences between 2 JSON data. Apart from this the delta is dependent on individual data nodes of the JSON data, this is because the delta report will contain the action, xpath and the source/target data. And since the xpaths are unique to data nodes and not leaf data, every delta entity in delta report will be between 2 data nodes. Going by the general convention and referring RFC-6902:
| Updated as per notes. |
2 | How to handle multiple changes at different levels? | Since the delta report will contain the xpaths of data nodes changed, so for changes at multiple levels i.e., parent and child data nodes, the approach will be to handle each data node individually and report them in the delta report. | |
3 | More scenarios need to be explored and documented in detail. Such as handling arrays within a json, handling child/grandchild changes. | scenarios such as data nodes at multiple levels, arrays and lists are covered. |
...
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "action": "ADDcreate", "xpath": "/bookstore/categories/[@code=3]", "target-data": { "code": 3, "name": "kidz" } }, { "action": "REMOVEremove", "xpath": "/bookstore/categories/[@code=1]", "source-data": { "code": 1, "name": "Fiction" } }, { "action": "UPDATEreplace", "xpath": "/bookstore/categories/[@code=2]", "source-data": { "name": "Funny" }, "target-data": { "name": "Comic" } } ] |
...
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "action": "ADDcreate", "xpath": "/bookstore/categories/[@code=3]", "target-data": { "code": "3,", "name": "kidz" } }, { "action": "REMOVEremove", "xpath": "/bookstore/categories/[@code=1]", "source-data": { "code": "1,", "name": "Fiction" } }, { "action": "UPDATEreplace", "xpath": "/bookstore/categories/[@code=2]", "source-data": { "name": "Funny" }, "target-data": { "name": "Comic" } } ] |
...