schemajson

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

func Unmarshal(data []byte, v any) error

Unmarshal wraps json.Unmarshal and calls validate.Validate afterwards.

See also Decoder.Decode

Types

type Decoder

type Decoder struct {
	*json.Decoder
}

Decoder wraps json.Decoder with validation step after decoding

See json.Decoder documentation

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

NewDecoder returns a new decoder that reads from r.

See json.NewDecoder documentation

func (*Decoder) Decode

func (dec *Decoder) Decode(v any) error

Decode wraps json.Decoder.Decode and calls validate.Validate afterwards.

See also Unmarshal

Jump to

Keyboard shortcuts

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