A json validator for golang
With Go module support, simply add the following import
import "github.com/luduoxin/json-validator-go/validator"
Otherwise, run the following Go command to install the json-validator-go
package:
$ go get -u github.com/luduoxin/json-validator-go
package main
import (
"fmt"
"github.com/luduoxin/json-validator-go/validator"
)
func main() {
dataStr := `{"foo":"bar"}`
err := validator.Valid([]byte(dataStr))
fmt.Println(err)
}
We appreciate your help!