jsonschema

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachingValidator

type CachingValidator struct {
	// contains filtered or unexported fields
}

CachingValidator implements a caching JSON schema validator where a give schema is compiled once for the validator and is reused for subsequent validations.

func NewCachingValidator

func NewCachingValidator() *CachingValidator

NewCachingValidator returns a new caching JSON schema validator.

func (*CachingValidator) Validate

func (c *CachingValidator) Validate(data interface{}, schemaID string, schema []byte) error

Validate validates the given JSON document against the given schema.

type Document

type Document map[string]interface{}

Document holds the JSON schema document.

type Validator

type Validator interface {
	ValidateJSONSchema(data interface{}) error
}

Validator is a JSON schema validator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL