https://github.com/aereal/jsondiff
functions to calculate JSON objects differences with gojq filter
https://github.com/aereal/jsondiff
go golang json
Last synced: 9 months ago
JSON representation
functions to calculate JSON objects differences with gojq filter
- Host: GitHub
- URL: https://github.com/aereal/jsondiff
- Owner: aereal
- License: mit
- Created: 2022-03-16T14:08:58.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-09-04T04:27:10.000Z (10 months ago)
- Last Synced: 2025-09-09T13:15:07.204Z (10 months ago)
- Topics: go, golang, json
- Language: Go
- Homepage:
- Size: 53.7 KB
- Stars: 19
- Watchers: 2
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![status][ci-status-badge]][ci-status]
[![PkgGoDev][pkg-go-dev-badge]][pkg-go-dev]
# jsondiff
jsnodiff provides functions to calculate JSON objects differences with [gojq][] filter.
## Synopsis
See examples on [pkg.go.dev][pkg-go-dev].
## Installation
```sh
go get github.com/aereal/jsondiff
```
## CLI
```sh
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
```
## See also
- [gojq][]
- Thanks to this library, it is able to filter JSON structures
## License
See LICENSE file.
[pkg-go-dev]: https://pkg.go.dev/github.com/aereal/jsondiff
[pkg-go-dev-badge]: https://pkg.go.dev/badge/aereal/jsondiff
[ci-status-badge]: https://github.com/aereal/jsondiff/workflows/CI/badge.svg?branch=main
[ci-status]: https://github.com/aereal/jsondiff/actions/workflows/CI
[gojq]: https://github.com/itchyny/gojq