Compare JSON objects to identify structural differences, added/removed keys, and changed values. Use via MCP in Claude Code or Windsurf, or call GET /v1/json/diff directly. Returns detailed diff showing operations needed to transform one JSON into another. Perfect for API response validation, configuration changes, and data migration verification.
curl "https://tinyfn.io/v1/json/diff" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/json/diff', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/json/diff',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's json tools:
{
"mcpServers": {
"tinyfn-json": {
"url": "https://tinyfn.io/mcp/json",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Recursively compares nested structures, tracking path-based differences like 'user.address.city' changed from 'NYC' to 'Boston'. Array differences show index-level changes and element additions/removals.
Returns structured diff with operation types (add, remove, replace), JSON paths, and old/new values. Compatible with JSON Patch RFC 6902 format for programmatic processing.
Yes, works seamlessly in Cursor, Windsurf, and Claude Code. AI agents can compare API responses, validate data transformations, or check configuration drift without hallucinating differences.
Detects type changes like string to number or object to array, marking them as 'replace' operations with both old and new type information for accurate comparison.
JSON diff understands data structure semantically—key order doesn't matter, but value changes do. Text diff compares character-by-character, missing logical JSON relationships.