https://github.com/orasik/gocomparejson
Compare two json strings in golang and return true if they match
https://github.com/orasik/gocomparejson
go golang json
Last synced: 2 months ago
JSON representation
Compare two json strings in golang and return true if they match
- Host: GitHub
- URL: https://github.com/orasik/gocomparejson
- Owner: orasik
- License: mit
- Created: 2017-12-29T14:26:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-29T17:46:34.000Z (over 7 years ago)
- Last Synced: 2025-02-02T23:59:05.855Z (4 months ago)
- Topics: go, golang, json
- Language: Go
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://goreportcard.com/report/github.com/orasik/gocomparejson)
[](https://travis-ci.org/orasik/gocomparejson)
[](https://codecov.io/gh/orasik/gocomparejson)# ComapreJSON
Compare two json strings in go lang
### Installation
```bash
go get github.com/orasik/gocomparejson
```### Usage
#### Example
```go
package mainimport (
"fmt"
jsonutil "github.com/orasik/gocomparejson"
)func main() {
json1 := []byte(`{"hello":"world"}`)
json2 := []byte(`{
"hello":"world"
}`)val, err := jsonutil.CompareJSON(string(json1), string(json2))
fmt.Print(val)
fmt.Print(err)
}
```### Unit test
```bash
go test -v
```