Skip to content

Files

Latest commit

 

History

History
8 lines (6 loc) · 528 Bytes

README.md

File metadata and controls

8 lines (6 loc) · 528 Bytes

diff3-json-merge-algorithm

Get diff of 2 json objects: getDifferences(String documentToUpdate, String currentDocument)

Get the merged json object: merge(String sourceDocument, String currentDocument, String newDocument)

This json merge algorthim uses the diff3 merging strategy which uses the diff between source and published as well as source and new to generate the final json. The Source json is a common ancestor of the new(latest changes) and the published (whats currently in storage) json.