jsondiffpatch is a JavaScript library that compares and patches JSON objects, providing a compact delta format that captures additions, modifications, deletions, and array moves. Created by Benjamin Eidelman, it features smart array diffing using LCS algorithm, multiple output formatters (HTML, console, JSON Patch RFC 6902), and text diffing for long strings. The library includes an MCP server implementation that enables AI assistants to compare text or structured data in various formats (JSON, YAML, TOML, XML) and get readable diffs. Ideal for version control systems, data synchronization, and change visualization in web applications.
Compare text or data and get a readable diff. Inputs: left (string | unknown[] | Record<string, unknown>), leftFormat (string, optional), right (string | unknown[] | Record<string, unknown>), rightFormat (string, optional), outputFormat (string, optional)
No reviews yet. Be the first to review!
Sign in to join the conversation
Our bundler currently only supports TypeScript-based servers. Check back soon!