Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/target
**/*.rs.bk
.idea
Cargo.lock
244 changes: 0 additions & 244 deletions Cargo.lock

This file was deleted.

24 changes: 13 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "json_diff"
version = "0.1.2"
authors = ["ksceriath"]
edition = "2018"
name = "json_diff_ng"
version = "0.3.1"
authors = ["ksceriath", "ChrisRega"]
edition = "2021"
license = "Unlicense"
description = "A small diff tool utility for comparing jsons"
description = "A small diff tool utility for comparing jsons. Forked from ksceriath and improved for usage as a library and with good support for array diffs."
readme = "README.md"
homepage = "https://github.com/ksceriath/json-diff"
repository = "https://github.com/ksceriath/json-diff"
homepage = "https://github.com/ChrisRega/json-diff"
repository = "https://github.com/ChrisRega/json-diff"
keywords = ["cli", "diff", "json"]
categories = ["command-line-utilities"]

Expand All @@ -23,7 +23,9 @@ path = "src/main.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde_json = "1.0.41"
maplit = "1.0.2"
colored = "1.9.0"
structopt = "0.3.5"
thiserror = "1.0"
vg_errortools = "0.1"
serde_json = "1.0"
maplit = "1.0"
clap = {version = "4.4", features = ["derive"]}
diffs = "0.5"
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@ Input can be fed as inline strings or through files.
For readability, output is neatly differentiated into three categories: keys with different values, and keys not present in either of the objects.
Only missing or unequal keys are printed in output to reduce the verbosity.

## Screenshot of diff results

[![A screenshot of a sample diff with json_diff](https://github.com/ksceriath/json-diff/blob/master/Screenshot.png)](https://github.com/ksceriath/json-diff/blob/master/Screenshot.png)

Usage Example:

`$ json_diff f source1.json source2.json`
`$ json_diff d '{...}' '{...}'`
`$ json_diff file source1.json source2.json`
`$ json_diff direct '{...}' '{...}'`

Option:

f : read input from json files
d : read input from command line
file : read input from json files
direct : read input from command line

### Installation

Expand Down
38 changes: 0 additions & 38 deletions src/constants.rs

This file was deleted.

Loading