The diff walks both documents and flags what changed, what was added, and what disappeared at every path in the tree.
Example 1: User object v1 vs v2
Schemas evolve between releases. Comparing before and after tells you which fields were added, renamed, or changed type.
Input A
{
"id": 1,
"name": "Alice",
"role": "editor"
}Input B
{
"id": 1,
"name": "Alice",
"role": "admin",
"email": "alice@example.com"
}Output
~ role: "editor" -> "admin"
+ email: "alice@example.com"
Example 2: API response before and after a backend fix
Regressions often show up as subtle shifts inside an array of objects. Lining up the two responses makes the drift obvious.
Input A
{
"items": [
{ "sku": "A-1", "stock": 12 },
{ "sku": "A-2", "stock": 0 }
]
}Input B
{
"items": [
{ "sku": "A-1", "stock": 12 },
{ "sku": "A-2", "stock": 5 }
]
}Output
~ items[1].stock: 0 -> 5
Example 3: Nested config change
Configuration files grow deep. The diff surfaces modifications buried several levels in without you having to read the whole tree.
Input A
{
"server": {
"host": "localhost",
"port": 3000,
"tls": { "enabled": false }
}
}Input B
{
"server": {
"host": "localhost",
"port": 8443,
"tls": { "enabled": true, "cert": "/etc/ssl/server.pem" }
}
}Output
~ server.port: 3000 -> 8443
~ server.tls.enabled: false -> true
+ server.tls.cert: "/etc/ssl/server.pem"