Skip to content

About

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

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

🧾 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.

About

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

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages