You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: index/json-diff-and-patch.md
+23-10
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,18 @@ A **diff** takes two JSON objects and presents any differences between them. Dif
28
28
29
29
A **patch** applies a diff to two objects to obtain a new object with any differences highlighted. A patch is applied individually or in bulk to a patch endpoint that will apply the patch to the specified data product.
See [JSON-DP client tutorials](json-diff-and-patch.md#json-dp-client-tutorials) for use cases, including connectivity with MongoDB.
42
+
31
43
## Use JSON-DP with a TerminusDB client
32
44
33
45
Use JSON-DP with a TerminusDB JavaScript or Python client to find and handle changes in TerminusDB schemas and documents, JSON schemas, and other document databases such as MongoDB. See [JSON-DP client tutorials](json-diff-and-patch.md#json-dp-client-tutorials) for use cases, including connectivity with MongoDB.
@@ -43,7 +55,7 @@ Use JSON-DP with a TerminusDB JavaScript or Python client to find and handle cha
43
55
Get started with the simple steps below.
44
56
45
57
{% hint style="info" %}
46
-
If using **TerminusX with Python**, connect to your TerminusX cloud instance first - see [Connect with WOQLClient](../readme/terminusx/quick-start/start-with-client.md#connect-with-woqlclient) for instructions if required. 
58
+
If using **TerminusX with Python**, connect to your TerminusX cloud instance first - see [Connect with WOQLClient](../readme/terminusx/quick-start/start-with-client.md#connect-with-woqlclient) for instructions if required.
47
59
{% endhint %}
48
60
49
61
1\.[Create an endpoint](json-diff-and-patch.md#create-an-endpoint)
@@ -84,8 +96,6 @@ Get the difference/s between two hypothetical documents - `Doc1` and `Doc2`.
84
96
{% tab title="JavaScript" %}
85
97
Use `getDiff`
86
98
87
-
88
-
89
99
```javascript
90
100
let result_patch =awaitclient.getDiff(Doc1, Doc2)
91
101
```
@@ -94,8 +104,6 @@ let result_patch = await client.getDiff(Doc1, Doc2)
94
104
{% tab title="Python" %}
95
105
Use`diff`
96
106
97
-
98
-
99
107
```python
100
108
result_patch = client.diff(Doc1, Doc2)
101
109
```
@@ -116,8 +124,6 @@ console.log(result_patch)
116
124
{% tab title="Python" %}
117
125
Example uses`pprint` (`from pprint import pprint`)
Tutorials for using JSON-DP with a TerminusDB [JavaScript or Python client](https://github.com/terminusdb/terminusdb-tutorials/tree/master/diff\_patch), including the use of JSON-DP with MongoDB.
0 commit comments