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.
jsonschema
✓ github.com/ory/jsonschema/v3
Compiles and validates a JSON document against a JSON Schema.
package main
import (
"fmt"
"github.com/ory/jsonschema/v3"
)
func main() {
c := jsonschema.NewCompiler()
schema, err := c.Compile("https://example.com/schema.json")
if err != nil {
panic(err)
}
if err := schema.Validate(map[string]interface{}{"name": "test"}); err != nil {
fmt.Println("Invalid:", err)
} else {
fmt.Println("Valid")
}
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
3.0.8latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.