MiniMindsLab JSON Deep Diff
Deterministically compare two JSON-compatible Python values (or JSON strings) recursively and report path-based differences.
Features
- Pure Python, standard library only
- Deterministic output ordering
- Supports nested
dictandliststructures - Distinguishes JSON booleans from numbers (
trueis not1) - Clear
ValueErroron invalid JSON input text
Installation
pip install minimindslab-json-deep-diff
Usage
from minimindslab_json_deep_diff import deep_diff
left = {
"name": "demo",
"flags": [True, False],
"meta": {"version": 1}
}
right = {
"name": "demo2",
"flags": [True],
"meta": {"version": 1, "new": "x"}
}
result = deep_diff(left, right)
print(result)
# {
# 'added': [{'path': '$.meta.new', 'value': 'x'}],
# 'removed': [{'path': '$.flags[1]', 'value': False}],
# 'changed': [
# {'path': '$.name', 'from': 'demo', 'to': 'demo2'}
# ]
# }
You can also pass JSON text:
result = deep_diff('{"a":1}', '{"a":2}')
API
deep_diff(left, right) -> dictparse_json_value(value) -> Any
Return structure:
added: list of{path, value}removed: list of{path, value}changed: list of{path, from, to}
Paths use a JSONPath-like format rooted at $, with object keys via .key and list indices via [index].
License
MIT
Metadata
Release files for minimindslab-json-deep-diff 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| minimindslab_json_deep_diff-0.1.0.tar.gz | 4.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minimindslab_json_deep_diff-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.9 kB
Release files / minimindslab_json_deep_diff-0.1.0.tar.gz
| Download URL | minimindslab_json_deep_diff-0.1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d2d52bb799b57abb46e990045c3af0e9685081350c185865c93f4e7191b60ea
|
|
BLAKE2b-256 checksum How to use checksums |
ef94067766cbb3c53bd2aaddb9d03ee90bfa5d1c7f9cc0f1d2fcdf0da4439f92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Release files / minimindslab_json_deep_diff-0.1.0-py3-none-any.whl
| Download URL | minimindslab_json_deep_diff-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77096966747ad9db17bcd4cdc450018b19aa72fbafa66888fdb88fc39ac105ca
|
|
BLAKE2b-256 checksum How to use checksums |
0630854f46fa5d2c127f4acc189b6a5f4233ae36548f1f21233255afed7b2ad9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Security for minimindslab-json-deep-diff 0.1.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.