Help us shape the future of Go! Take the 2026 Go Developer Survey

jsonschema

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ValidationError

type ValidationError struct {
	Field   string `json:"field"`
	Message string `json:"message"`
}

ValidationError describes a schema validation failure.

func ValidateArgs

func ValidateArgs(args json.RawMessage, schema json.RawMessage) []ValidationError

ValidateArgs validates JSON arguments against a JSON Schema definition. schema is a json.RawMessage containing a JSON Schema object with "type", "properties", "required". args is the actual arguments to validate. Returns nil if valid, or a list of ValidationErrors.

func (ValidationError) Error

func (e ValidationError) Error() string

Jump to

Keyboard shortcuts

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