A minimal, human-readable JSON difference tool.
Project description
🧾 json-differ — Minimal JSON Difference Tool
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file json_differ-1.0.0.tar.gz.
File metadata
- Download URL: json_differ-1.0.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71bbdb19632f069295390618a2f1c35583d02e602cded0eb9af0456c9d7966f6
|
|
| MD5 |
35b639d29a60b6d2316db89966f698dd
|
|
| BLAKE2b-256 |
23061cfc8f8712bfe77431164d44d9fc90f4635fa54dd9cd4af66da6cf14d38f
|
File details
Details for the file json_differ-1.0.0-py3-none-any.whl.
File metadata
- Download URL: json_differ-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78ba603c0a12f0f6eb38158b9fe12f8c7fa14541cf4cbbcb5d115c7ed3290d0d
|
|
| MD5 |
d666a0ba6bbdcc4579f33dce8f510130
|
|
| BLAKE2b-256 |
b8d33f74810b81cea2204d52fc6e90667a020f54cb3af6d81cde88dcca71a1c2
|