--- id: jsoncomparison version: "1.1.0" license: MIT license_treatment: permissive maintenance: dormant --- # jsoncomparison — json compare utility License: permissive · Maintenance: dormant · Downloads: 1.0M/mo ## What it is and what it does jsoncomparison is a utility for comparing two JSON-like objects (dictionaries, lists, nested structures) and reporting all differences in a structured format. It identifies type mismatches, value changes, missing or extra keys, and array length/content variations, returning a nested dictionary that mirrors the structure of the input and marks each discrepancy with metadata (_message, _expected, _received). The package is commonly used in test assertions to validate that actual API responses or data structures match expected outputs. The library offers configuration options to customize comparison behavior—such as rounding tolerances for floats and array length checking—and supports ignore rules to exclude specific keys or values from comparison. With zero runtime dependencies and a pure-Python wheel distribution, it installs quickly and runs without external system requirements. Use it for: - Validate API responses in integration tests by comparing expected JSON structure to actual server output. - Detect configuration file changes by comparing old and new JSON/dict representations and reporting all differences. - Assert test data correctness in unit tests where nested object equality needs detailed diff output. - Debug data transformation pipelines by comparing input and output JSON structures to identify where values diverge. - Generate human-readable diff reports for JSON documents in CI/CD pipelines to track what changed between versions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Compares two JSON-like objects and returns a detailed dictionary of differences, including type mismatches, value changes, missing keys, and array length variations. Yes, if you need JSON/dict comparison in tests or data validation and can tolerate dormant maintenance. The package is stable, dependency-free, and widely used (1M+ monthly downloads). However, do not install if you require active bug fixes, Python 3.10+ support guarantees, or ongoing feature development—the last release was in 2021 and no updates are planned. ## Install pip install jsoncomparison uv add jsoncomparison poetry add jsoncomparison ## Installing jsoncomparison Before you install: Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2021-05-17, over 1915 days ago—so expect no active bug fixes or updates, though the package remains archived=false and the repo is still accessible. License in practice: MIT license is permissive and imposes minimal restrictions; you can use this package freely in commercial and private projects with only attribution required. Quickstart: pip install jsoncomparison from jsoncomparison import Compare, NO_DIFF expected = {"key": "value"} actual = {"key": "other"} diff = Compare().check(expected, actual) if diff != NO_DIFF: print(diff) Requires Python >=3.6.1,<4.0.0; no external runtime dependencies. Verify before relying: - Whether the package handles circular references or deeply nested structures without performance degradation. - Current compatibility with Python 3.10+ given the last release predates those versions. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 1.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags json comparison, compare nested objects, json diff, test data validation, detect json differences, object equality check, json assertion, testing, json-diff, data-validation [View on SkillFed](https://skillfed.io/packages/jsoncomparison) · [View on PyPI](https://pypi.org/project/jsoncomparison/)