Versions Compared

Key

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

...

  • In order to find the values that have been updated between two data nodes, each leaf node present under the source data node is to be accessed and compared to the leaf node present under the target data node. In doing so all the information about the data nodes relation to other data nodes is lost, because the algorithm accesses each first flattens all the data nodes into a linear structure for easier comparision.

  • Then the algorithm accesses the source and target data node based on their xpath

  • When it finds source and target data nodes having the same xpath, then accesses we fetch the individual leaves nodes of the said data node, which these leaves are then compared and based on if any changes detected the leaves are added to the delta report.
    Since the data is accessed at a low level (leaf node) to generate the delta report, it becomes impossible to reconstruct the data node back and represent the updated data in the original JSON/XML structure. Therefore, the best approach is to provide the delta of updated nodes individually irrespective of the fact that they are in a parent-child relationship.

  • Reconstructing the data node to represent the original data structure would require some kind of data manipulation which is not suitable as it could lead to discrepancies in the delta that is generated.

  • The same is described below in form of the flowchart.

For the following scenarios we take the following source and target data as a common starting point

...