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

encoded

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package encoded implements bounded, exact validation of encoded JSON. Its graph and budgets are independent from the decoded-value engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(ctx context.Context, root *Node, document []byte) error

Validate checks one strict JSON instance against a compiled graph.

Types

type Node

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

Node owns a checked schema and its compiled applicators. A nil doc represents a boolean schema; object schemas always have a nonnil doc. All maps become immutable when FromJSONSchemaStrict returns.

func Compile

func Compile(document []byte) (*Node, error)

Compile builds an immutable, self-contained strict schema graph.

Jump to

Keyboard shortcuts

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