Compare two json strings in go lang
go get github.com/orasik/gocomparejson
package main
import (
"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)
}
go test -v