Data Transform
JSON Patch diff API
Computes the minimal RFC6902 JSON Patch that transforms one document into another (add/remove/replace), so you can store or transmit changes instead of whole docs. Answers 'What patch turns doc A into doc B?', 'How do I diff two JSON documents into RFC6902 ops?'.
Price$0.02per request
MethodPOST
Route/v1/data-transform/json-patch-diff
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
data-transformjson-patchrfc6902diffdeltajsonwrangle
API URL
Integration docshttps://x402.hexl.dev/v1/data-transform/json-patch-diffExample request
{
"from": {
"a": 1,
"b": 2,
"c": 3
},
"to": {
"a": 1,
"b": 20,
"d": 4
}
}Example response
{
"patch": [
{
"op": "replace",
"path": "/b",
"value": 20
},
{
"op": "remove",
"path": "/c"
},
{
"op": "add",
"path": "/d",
"value": 4
}
],
"opCount": 3
}Input schema
{
"type": "object",
"required": [
"from",
"to"
],
"properties": {
"from": {
"type": "object",
"examples": [
{
"a": 1,
"b": 2,
"c": 3
}
]
},
"to": {
"type": "object",
"examples": [
{
"a": 1,
"b": 20,
"d": 4
}
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}