Two Way Merge Operations

DeltaJSON Merge operation is effectively a resolved comparison where changes have been merged into a specified version. This operation is commonly used in version control systems to merge files and resolve conflicts using the resulting file.

Tow Way Merge 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 control over how items in arrays are matched for comparison 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 Merge Priority parameter allows you to control priority in case of conflicts and can have following values:

  • A (default)

  • 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 - 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 Merge Priority options.

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

  • Once the operation is complete a prompt indicating the status will 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 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 Merge, please refer to Two Way Merge Guide