Skip to main content

🧾 json-differ — Minimal JSON Difference Tool

PyPI version Python Version License: MIT

A lightweight JSON differ that makes it easy to spot what changed — added, removed, or modified — between two JSON files or Python objects.

✨ Ideal for developers working with APIs, configurations, or data migrations.


🚀 Installation

pip install json-differ

Or, if using locally:

git clone git@github.com:syedrakesh/json-differ.git
cd json-differ
pip install .

💡 CLI Usage

json-differ examples/sample1.json examples/sample2.json

Output:

{
  "changed": true,
  "diff": {
    "added": {"city": "Paris"},
    "removed": {},
    "modified": {"age": {"from": 25, "to": 26}}
  }
}

Optional flags:

--pretty   # formatted output (default)
--compact  # single-line JSON

🧠 Python API

from json_differ import json_diff

a = {"name": "Alice", "age": 25}
b = {"name": "Alice", "age": 26, "city": "Paris"}

result = json_diff(a, b)
print(result)

🧩 Example JSON Files

json-differ examples/sample1.json examples/sample2.json

Sample input files are included in examples/.


🧰 Features

✅ No dependencies
✅ Nested dict & list comparison
✅ CLI + Python API both supported
✅ Simple structured output


🧾 License

MIT © 2025 Syed Rakesh Uddin


Built with ❤️ for developers who appreciate small, smart tools.

Metadata

Release files for json-differ 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for json-differ 1.0.0
File Size Uploaded Provenance Actions
json_differ-1.0.0.tar.gz 3.7 kB Without provenance Details for json_differ-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for json-differ 1.0.0
File Interpreter ABI Platform Actions
json_differ-1.0.0-py3-none-any.whl Python 3 none any Details for json_differ-1.0.0-py3-none-any.whl

Total release size: 8.4 kB

Release files / json_differ-1.0.0.tar.gz

Download URL json_differ-1.0.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
71bbdb19632f069295390618a2f1c35583d02e602cded0eb9af0456c9d7966f6
BLAKE2b-256 checksum
How to use checksums
23061cfc8f8712bfe77431164d44d9fc90f4635fa54dd9cd4af66da6cf14d38f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / json_differ-1.0.0-py3-none-any.whl

Download URL json_differ-1.0.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78ba603c0a12f0f6eb38158b9fe12f8c7fa14541cf4cbbcb5d115c7ed3290d0d
BLAKE2b-256 checksum
How to use checksums
b8d33f74810b81cea2204d52fc6e90667a020f54cb3af6d81cde88dcca71a1c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Security for json-differ 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page