jsnodiff provides functions to calculate JSON objects differences with gojq filter.
See examples on pkg.go.dev.
go get github.com/aereal/jsondiff
go install github.com/aereal/jsondiff/cmd/jsondiff@latest
jsondiff -only '.d' ./testdata/from.json ./testdata/to.json
# --- from.json
# +++ to.json
# @@ -1,2 +1,2 @@
# -4
# +3
- gojq
- Thanks to this library, it is able to filter JSON structures
See LICENSE file.