yazgazan / Jaydiff
Licence: mit
A JSON diff utility
Stars: ✭ 84
Projects that are alternatives of or similar to Jaydiff
Trdsql
CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.
Stars: ✭ 593 (+605.95%)
Mutual labels: cli, json
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (+803.57%)
Mutual labels: cli, json
Ponzu
Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
Stars: ✭ 5,373 (+6296.43%)
Mutual labels: cli, json
Remarshal
Convert between CBOR, JSON, MessagePack, TOML, and YAML
Stars: ✭ 421 (+401.19%)
Mutual labels: cli, json
Fast Xml Parser
Validate XML, Parse XML to JS/JSON and vise versa, or parse XML to Nimn rapidly without C/C++ based libraries and no callback
Stars: ✭ 1,021 (+1115.48%)
Mutual labels: cli, json
Structured Text Tools
A list of command line tools for manipulating structured text data
Stars: ✭ 6,180 (+7257.14%)
Mutual labels: cli, json
Visidata
A terminal spreadsheet multitool for discovering and arranging data
Stars: ✭ 4,606 (+5383.33%)
Mutual labels: cli, json
Html Table Cli
Create interactive tables from JSON on the command-line
Stars: ✭ 23 (-72.62%)
Mutual labels: cli, json
Node Minify
Light Node.js module that compress javascript, css and html files
Stars: ✭ 404 (+380.95%)
Mutual labels: cli, json
Http Prompt
An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie
Stars: ✭ 8,329 (+9815.48%)
Mutual labels: cli, json
Jsondiff
Diff JSON and JSON-like structures in Python
Stars: ✭ 404 (+380.95%)
Mutual labels: json, diff
Ramda Cli
🐏 A CLI tool for processing data with functional pipelines
Stars: ✭ 515 (+513.1%)
Mutual labels: cli, json
Resume Cli
CLI tool to easily setup a new resume 📑
Stars: ✭ 3,967 (+4622.62%)
Mutual labels: cli, json
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 (+659.52%)
Mutual labels: json, diff
JayDiff
A JSON diff utility.
Install
Downloading the compiled binary
- Download the latest version of the binary: releases
- extract the archive and place the
jaydiff
binary in your$PATH
From source
- Have go 1.11 or greater installed: golang.org
- run
go get -u github.com/yazgazan/jaydiff
Usage
Usage:
jaydiff [OPTIONS] FILE_1 FILE_2
Application Options:
-i, --ignore= paths to ignore (glob)
--indent= indent string (default: "\t")
-t, --show-types show types
--json json-style output
--ignore-excess ignore excess keys and array elements
--ignore-values ignore scalar's values (only type is compared)
-r, --report output report format
--slice-myers use myers algorithm for slices
--stream treat FILE_1 and FILE_2 as JSON streams
--stream-lines read JSON stream line by line (expecting 1 JSON value per line)
--stream-ignore-excess ignore excess values in JSON stream
--stream-validate compare FILE_2 JSON stream against FILE_1 single value
-v, --version print release version
Help Options:
-h, --help Show this help message
Examples
Getting a full diff of two json files:
$ jaydiff --show-types old.json new.json
map[string]interface {} map[
a: float64 42
b: []interface {} [
float64 1
- float64 3
+ float64 5
+ float64 4
]
c: map[string]interface {} map[
- a: string toto
+ a: string titi
- b: float64 23
+ b: string 23
]
- e: []interface {} []
- f: float64 42
g: []interface {} [1 2 3]
+ h: float64 42
]
Ignoring fields:
$ jaydiff --show-types \
--ignore='.b\[\]' --ignore='.d' --ignore='.c.[ac]' \
old.json new.json
map[string]interface {} map[
a: float64 42
b: []interface {} [1 3]
c: map[string]interface {} map[
- b: float64 23
+ b: string 23
]
- e: []interface {} []
- f: float64 42
g: []interface {} [1 2 3]
+ h: float64 42
]
Report format:
$ jaydiff --report --show-types old.json new.json
- .b[1]: float64 3
+ .b[1]: float64 5
+ .b[2]: float64 4
- .c.a: string toto
+ .c.a: string titi
- .c.b: float64 23
+ .c.b: string 23
- .e: []interface {} []
- .f: float64 42
+ .h: float64 42
JSON-like format:
$ jaydiff --json old.json new.json
{
"a": 42,
"b": [
1,
- 3,
+ 5,
+ 4
],
"c": {
- "a": "toto",
+ "a": "titi",
- "b": 23,
+ "b": "23"
},
- "e": [],
- "f": 42,
"g": [1,2,3],
+ "h": 42
}
Ignore Excess values (useful when checking for backward compatibility):
$ jaydiff --report --show-types --ignore-excess old.json new.json
- .b[1]: float64 3
+ .b[1]: float64 5
- .c.a: string toto
+ .c.a: string titi
- .c.b: float64 23
+ .c.b: string 23
- .e: []interface {} []
- .f: float64 42
Ignore values (type must still match):
$ jaydiff --report --show-types --ignore-excess --ignore-values old.json new.json
- .c.b: float64 23
+ .c.b: string 23
- .e: []interface {} []
- .f: float64 42
JSON streams:
$ jaydiff --stream --json old.json new.json
[
{"foo":"bar"},
[
2,
3,
4,
{
+ "v": "some"
}
],
+ {"some":"thing"}
]
Validating JSON stream types:
$ jaydiff --ignore-excess --ignore-values --stream-validate --report --show-types base.json stream.json
- [1].bar: float64 4.2
+ [1].bar: string !
Ideas
- JayPatch
Sponsored by Datumprikker.nl
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].