Skip to main content
Skip table of contents

Using DeltaJSON Three Way Merge

Three Way Merge Operations

DeltaJSON three way merge is an extension to the merge operation and a special case of graft where the two inputs have a common immediate ancestor. These inputs are independent edits of the ancestor. It could be used to style changes in a publication, using strike through, red/green background or change bars to indicate change visually.

Three Way Parameters/Configuration Options

The property Word By Word allows you to perform a word by word comparison of the JSON input files. The Array Alignment parameter on the other hand allows you to control over how items in arrays are matched for comparison and using the following values:

  • Orderless (default)- Alignment will be done by a heuristic algorithm which assesses how similar items are rather than using their order in the array. Items which are most similar are aligned first. The algorithm favours matches based on data that uniquely identifies items over data that is common across items. Setting wordByWord to true can result in phrases matching each other even though they have little in common. This is by design.

  • Type with Value - Alignment will be by equality first (same type and value), then by type. Items of different type will never align. Note that item position is still a factor, particularly where items have the same type.

  • Position - Alignment will be purely by item position in the array.

The Conflicts Resolution parameter allows show the results in the required manner and can have following values:

  • Show (default)

  • Resolve with Input A

  • Resolve with Input B

Quick steps:

  • Enter the Job Description(identifier for the job) in order to make it easier to locate the job/operation later.

  • Upload by clicking on the button or “Drag and Drop” your input files onto the required area - Ancestor File, Input File A and Input File B. Alternatively navigate to the Files view and enter the inputs manually in the editor.

You can view/edit your input files by clicking on the View Files button that navigates to the Files editor

The icons to the right of your inputs indicate the status of your inputs - valid, invalid or more related information. Click on the icons to know more.

  • A unique Result File name for each operation is set by default but you can enter the desired result file name in the text input provided.

  • Toggle the Word By Word property as you like.

  • Select the required radio box to indicate the Array Alignment and Conflicts Resolution options.

  • Click on Run and wait for the magic to happen!

  • Once the operation is complete a prompt indicating the status should appear, then click on the View Files button to view your result in the editor.

  • Also, you can click on the Result File button (once enabled after comparison is finished successfully) to download the result file.

  • The Logs view at any time shows the status of all the operations run during the session. This can be used to follow status of a long running merging or find more information in case a failure occurs.

More than one operation can be run at one time. Prompts will appear on the top right corner of the screen indicating the status of the operation. Alternatively, you can view the Logs to check the status of various operations running in parallel

  • This merge operation/job is logged as a new job in the Jobs History view. This view can be used to view details of all the currently/previously run merge operations by the user.

For detailed information on DeltaJSON Three Way Merge, please refer to Three Way Merge Guide

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.