Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

JSONDiffTool

JSONDiffTool is a Python application designed to compare two JSON states, detect updated fields, and help analyze how data changes after a user action.

Context

This project comes from a real need observed during an internship.
The goal was to compare JSON API responses before and after a user input in order to identify which fields were impacted, then track how these fields evolve during testing scenarios.

At first, this need was partially covered with Bash scripts:

  • one script to compare a before state and an after state,
  • one script to follow the evolution of the fields detected as changed.

JSONDiffTool is the Python version of this idea, with a cleaner structure and a user interface.

Main goal

The main objective of this project is to provide a simple tool that can:

  • compare two JSON contents,
  • detect changed, added, removed, or type-changed fields,
  • display differences clearly,
  • export results if needed.

V1 scope

The first version focuses on:

  • a simple interface,
  • two input areas for pasting JSON content,
  • comparison of a before JSON and an after JSON,
  • direct display of differences in the interface,
  • optional CSV export of comparison results.

Planned improvements

Future versions may include:

  • loading JSON files from the interface,
  • tracking changed fields across multiple GET/PUT pairs,
  • search for a specific field,
  • comparison history,
  • ignoring technical fields,
  • advanced list handling.

Expected difference format

Each detected difference should contain at least:

  • path
  • change_type
  • old_value
  • new_value

Handled change types in V1:

  • modified
  • added
  • removed
  • type_changed

Project structure

JSONDiffTool/
├── app/
│ ├── __init__.py
│ ├── main.py
│ ├── core/
│ │ ├── __init__.py
│ │ └── comparator.py
│ ├── ui/
│ │ ├── __init__.py
│ │ └── interface.py
│ └── utils/
│ ├── __init__.py
│ └── json_loader.py
├── tests/
│ ├── __init__.py
│ └── test_comparator.py
├── sample_data/
│ ├── before.json
│ └── after.json
├── README.md
├── requirements.txt
└── .gitignore

Tech stack

  • Python
  • Streamlit for the interface
  • Pytest for testing

Project status

V1 in progress.

Notes

All example JSON files used in this repository must be anonymized.

About

A Python application for analyzing differences between JSON API responses, identifying fields impacted by user input, and tracking their evolution across test steps.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors