Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
gojsonschema
✓ github.com/ory/gojsonschema
Validates a JSON document against a JSON schema.
package main
import (
"fmt"
"github.com/ory/gojsonschema"
)
func main() {
schema := gojsonschema.NewStringLoader(`{"type": "object"}`)
doc := gojsonschema.NewStringLoader(`{"foo": "bar"}`)
result, _ := gojsonschema.Validate(schema, doc)
fmt.Println(result.Valid())
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.2.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.