All Projects → xlwings → Jsondiff

xlwings / Jsondiff

Licence: mit
Diff JSON and JSON-like structures in Python

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Jsondiff

Jsondiffpatch
Diff & patch JavaScript objects
Stars: ✭ 3,951 (+877.97%)
Mutual labels:  json, diff
Jaydiff
A JSON diff utility
Stars: ✭ 84 (-79.21%)
Mutual labels:  json, diff
Sirix
SirixDB is a temporal, evolutionary database system, which uses an accumulate only approach. It keeps the full history of each resource. Every commit stores a space-efficient snapshot through structural sharing. It is log-structured and never overwrites data. SirixDB uses a novel page-level versioning approach called sliding snapshot.
Stars: ✭ 638 (+57.92%)
Mutual labels:  json, diff
Cfgdiff
diff(1) all your configs
Stars: ✭ 138 (-65.84%)
Mutual labels:  json, diff
Diffson
A scala diff/patch library for Json
Stars: ✭ 258 (-36.14%)
Mutual labels:  json, diff
Api Diff
A command line tool for diffing json rest APIs
Stars: ✭ 164 (-59.41%)
Mutual labels:  json, diff
Json Git
A pure JS local Git to versionize any JSON
Stars: ✭ 109 (-73.02%)
Mutual labels:  json, diff
Dyff
/ˈdʏf/ - diff tool for YAML files, and sometimes JSON
Stars: ✭ 277 (-31.44%)
Mutual labels:  json, diff
Gojsondiff
Go JSON Diff
Stars: ✭ 371 (-8.17%)
Mutual labels:  json, diff
Resume Cli
CLI tool to easily setup a new resume 📑
Stars: ✭ 3,967 (+881.93%)
Mutual labels:  json
Dog Ceo Api
The API hosted at dog.ceo
Stars: ✭ 393 (-2.72%)
Mutual labels:  json
Zson
ZSON is a PostgreSQL extension for transparent JSONB compression
Stars: ✭ 385 (-4.7%)
Mutual labels:  json
Json.h
🗄️ single header json parser for C and C++
Stars: ✭ 387 (-4.21%)
Mutual labels:  json
Jawn
Jawn is for parsing jay-sawn (JSON)
Stars: ✭ 393 (-2.72%)
Mutual labels:  json
Polr
🚡 A modern, powerful, and robust URL shortener
Stars: ✭ 4,147 (+926.49%)
Mutual labels:  json
Jsoncons
A C++, header-only library for constructing JSON and JSON-like data formats, with JSON Pointer, JSON Patch, JSON Schema, JSONPath, JMESPath, CSV, MessagePack, CBOR, BSON, UBJSON
Stars: ✭ 400 (-0.99%)
Mutual labels:  json
Alp
Access Log Profiler
Stars: ✭ 382 (-5.45%)
Mutual labels:  json
Native
Generate a form using JSON Schema and Vue.js
Stars: ✭ 382 (-5.45%)
Mutual labels:  json
Tomlplusplus
Header-only TOML config file parser and serializer for C++17 (and later!).
Stars: ✭ 403 (-0.25%)
Mutual labels:  json
Json Rust
JSON implementation in Rust
Stars: ✭ 395 (-2.23%)
Mutual labels:  json

jsondiff

Diff JSON and JSON-like structures in Python.

Installation

pip install jsondiff

Quickstart

.. code-block:: python

>>> from jsondiff import diff

>>> diff({'a': 1, 'b': 2}, {'b': 3, 'c': 4})
{'c': 4, 'b': 3, delete: ['a']}

>>> diff(['a', 'b', 'c'], ['a', 'b', 'c', 'd'])
{insert: [(3, 'd')]}

>>> diff(['a', 'b', 'c'], ['a', 'c'])
{delete: [1]}

# Typical diff looks like what you'd expect...
>>> diff({'a': [0, {'b': 4}, 1]}, {'a': [0, {'b': 5}, 1]})
{'a': {1: {'b': 5}}}

# ...but similarity is taken into account
>>> diff({'a': [0, {'b': 4}, 1]}, {'a': [0, {'c': 5}, 1]})
{'a': {insert: [(1, {'c': 5})], delete: [1]}}

# Support for various diff syntaxes
>>> diff({'a': 1, 'b': 2}, {'b': 3, 'c': 4}, syntax='explicit')
{insert: {'c': 4}, update: {'b': 3}, delete: ['a']}

>>> diff({'a': 1, 'b': 2}, {'b': 3, 'c': 4}, syntax='symmetric')
{insert: {'c': 4}, 'b': [2, 3], delete: {'a': 1}}

# Special handling of sets
>>> diff({'a', 'b', 'c'}, {'a', 'c', 'd'})
{discard: set(['b']), add: set(['d'])}

# Load and dump JSON
>>> print diff('["a", "b", "c"]', '["a", "c", "d"]', load=True, dump=True)
{"$delete": [1], "$insert": [[2, "d"]]}

Command Line Client

Usage::

jsondiff [-h] [-p] [-s SYNTAX] [-i INDENT] first second

positional arguments:
  first
  second

optional arguments:
  -h, --help            show this help message and exit
  -p, --patch
  -s SYNTAX, --syntax SYNTAX
  -i INDENT, --indent INDENT

Examples:

.. code-block:: bash

$ jsondiff a.json b.json -i 2

$ jsondiff a.json b.json -i 2 -s symmetric
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].