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.