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.
pip install json-differOr, if using locally:
git clone git@github.com:syedrakesh/json-differ.git
cd json-differ
pip install .json-differ examples/sample1.json examples/sample2.jsonOutput:
{
"changed": true,
"diff": {
"added": {"city": "Paris"},
"removed": {},
"modified": {"age": {"from": 25, "to": 26}}
}
}Optional flags:
--pretty # formatted output (default)
--compact # single-line JSONfrom json_differ import json_diff
a = {"name": "Alice", "age": 25}
b = {"name": "Alice", "age": 26, "city": "Paris"}
result = json_diff(a, b)
print(result)json-differ examples/sample1.json examples/sample2.jsonSample input files are included in examples/.
✅ No dependencies
✅ Nested dict & list comparison
✅ CLI + Python API both supported
✅ Simple structured output
MIT © 2025 Syed Rakesh Uddin
Built with ❤️ for developers who appreciate small, smart tools.