TerminusDB Logo all white svg
Close this search box.

JSON Diff and Patch

We’re putting the finishing touches on our JSON Diff and Patch Module. It’s an open-source service that works with MongoDB and other document databases. It comes with API access so you can compare JSON documents and perform patch operations.

Can you spare 5 mins to help please?

We’re fairly certain that people will be interested in using the tool to compare JSON documents, either directly or via a user interface, but we’d like to know more about how you’d use it or envisage it being used to help us reach the right audience. We’d be grateful if you could answer 5 short questions so we can get a better understanding from potential users.

A more detailed overview of our JSON Diff & Patch Module can be found below.

We care about version control and collaboration for data

We’re focused on version control and collaborative data management, and appreciate not everyone wants to use TerminusDB as their database, so for those MongoDB or other database users, we wanted to provide tools to add on top of your existing developments to give you schema informed diff and patch capabilities.

JSON diff and patch overview

JSON objects are a very common way of representing data for software development. The serialization of JSON is straightforward, allowing communication via the network or storage in a database and almost all modern programming languages can manipulate them natively with ease.

When objects are modified in a distributed system, it is useful to be able to compare versions of an object to see what has changed according to the current knowledge about an object at some node.

This is where diff and patch come in. Diff takes two JSON objects and constructs a minimal (in some sense) difference between the two objects so the second object can be obtained from the first by means of a patch operation.

The diff between two objects can also be used to display to a user a synopsis of differences, in what might otherwise be too large an object to see obviously where things changed. This enables either direct or user-interface assisted choice of how to proceed in the cases where an object has been updated in a surprising way. This will allow the user to retain the original, change to the new, or instead, supply a new change altogether.

Want to be informed when the JSON Diff & Patch Module is ready to use?

Fill in the form below to be notified when we’ve released the JSON Diff & Patch Module.

Latest Stories
Talk to the team
If you've got questions or want to be part of the TerminusDB community, come say hi on Discord.