--- id: jsondiff version: "2.2.1" license: The MIT License (MIT) Copyright (c) 2015 Zoomer Analytics LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) license_treatment: permissive maintenance: active --- # jsondiff — Diff JSON and JSON-like structures in Python License: permissive · Maintenance: active · Downloads: 11.6M/mo ## What it is and what it does jsondiff computes a semantic diff between two JSON or JSON-like structures (dicts, lists, sets) and returns a compact representation of the changes. Instead of showing raw before-and-after values, it identifies specific insertions, deletions, and updates, making it easier to understand what changed between two versions of a data structure. The package supports multiple diff syntaxes (compact, symmetric, explicit), can exclude specific paths from comparison, handles sets with special add/discard operations, and can load/dump JSON strings directly. It includes both a Python API and a command-line tool (jdiff) for comparing JSON and YAML files. The single runtime dependency is pyyaml, used for YAML support in the CLI. Use it for: - Track configuration changes between versions by diffing JSON config files to see exactly what was added, removed, or modified. - Generate minimal patches for API responses to transmit only the differences to clients rather than full payloads. - Compare test fixtures or expected vs. actual output in test suites to identify specific assertion failures. - Audit data migrations by diffing database exports or snapshots to verify what records changed. - Build change logs or diffs for version control of JSON-based data (e.g., Terraform state, CloudFormation templates). ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Computes structured diffs between JSON and JSON-like Python objects, representing changes as insertions, deletions, and updates rather than raw value replacements. Yes. The package is lightweight, actively maintained, has no known vulnerabilities, uses a permissive MIT license, and solves a common problem cleanly. Install it if you need to understand or track changes in JSON or dict-like data structures; the low friction and stable API make it a safe dependency. ## Install pip install jsondiff uv add jsondiff poetry add jsondiff ## Installing jsondiff Before you install: Low install friction; pure Python wheel with a single runtime dependency (pyyaml). Repository is active with a recent commit on 2026-06-28 and has been maintained since its first release in 2015. License in practice: MIT License permits unrestricted use, modification, and distribution with only attribution required; no restrictions on commercial or proprietary use. Quickstart: pip install jsondiff import jsondiff result = jsondiff.diff({'a': 1, 'b': 2}, {'b': 3, 'c': 4}) print(result) # {'c': 4, 'b': 3, delete: ['a']} Requires Python 3.8 or later. Verify before relying: - Whether the package handles deeply nested structures or very large JSON documents efficiently. - Performance characteristics when diffing complex arrays with many reordered elements. ## Package facts - License: The MIT License (MIT) Copyright (c) 2015 Zoomer Analytics LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 11.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags json diff library, compare json objects, json change detection, structured diff tool, json patch generation, find differences between dicts, json delta, json-processing, testing-tools, data-comparison [View on SkillFed](https://skillfed.io/packages/jsondiff) · [View on PyPI](https://pypi.org/project/jsondiff/)