JSON Diff and Patch Operations
How to perform JSON diff & patch operations with a TerminusDB client or with MongoDB
TerminusDB represents objects such as documents and schemas in JSON-LD format. Use JSON Diff and Patch to easily compare these objects to obtain differences between them.
The Diff function returns a Patch object containing differences between the objects compared. Use Patch to implement manual or programmatic actions to resolve differences. Actions include:
- Retain the original object.
- Change to the new (or latest) version of the object.
- Create a new version of the object.
The functionality above is demonstrated in three simple steps: