Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Where ever possible the Delta Feature will throw the same exceptions as defined in CPS core. If any new exception for the delta feature are required the following will be updated here.

Issues & Decisions

#

Issue

Notes 

Decision

1Add or Delete leaves (optional leaves) handle as UPDATE or ADD/DELETE ?

The delta report proposed follows the Json Patch format of representing the differences between 2 json. Going by the general convention, referring RFC-6902:

  • Add: If the target location specifies an object member that does not already exist, a new member is added to the object.
  • Remove: The "remove" operation removes the value at the target location, given an object already exists at the location
  • Replace/Update: If the target location specifies an object member that does exist, that member's value is replaced.
  • Here target location is equivalent to the path of particular leaf
  • So, there it should be Add/Delete.
  • This approach is applicable when using JSON-P library. Also, libraries such as Jackson or Gson, have their own conventions and ways of generating a delta between 2 json.

2How to handle multiple changes at different levels?Example: 
  • if you compare multiple levels and say a grandchild of a the node you are comparing has been added or deleted is that an UPDATE  or just a ADD/
DELET
  • DELETE at that level

There could be Many more complex scenarios....


3The above scenarios need to be explored and documented in detail. Such as handling arrays within a json.

4Need to decide what the action/operation should be called.

Proposed: Add/Delete/Update

RFC-6902: add/remove/replace


HTTP response codes for Delta API

...