jsonvalue

package
v0.6.14 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxCanonicalNodes = 32768

	MaxSafeInteger = uint64(1<<53 - 1)
)

Variables

This section is empty.

Functions

func CloneCanonical

func CloneCanonical(value any) (any, error)

CloneCanonical validates a closed JSON value and returns a recursively owned copy. Maps and slices in the result never alias caller-owned containers.

func CloneCanonicalMap

func CloneCanonicalMap(value map[string]any) (map[string]any, error)

CloneCanonicalMap is the typed map form used at adapter and store boundaries.

func DecodeClosed

func DecodeClosed(raw []byte, target any) error

DecodeClosed decodes exactly one JSON value, preserves numbers as json.Number, and rejects unknown struct fields and trailing values.

func IsPositiveSafeUnsignedInteger

func IsPositiveSafeUnsignedInteger(value uint64) bool

func IsSafeUnsignedInteger

func IsSafeUnsignedInteger(value uint64) bool

func Normalize

func Normalize(value any) (normalized any, err error)

func ValidateCanonical

func ValidateCanonical(value any) error

ValidateCanonical enforces limits on the closed Go representation of a JSON value without invoking caller-defined encoding behavior.

Types

This section is empty.

Jump to

Keyboard shortcuts

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