Documentation
¶
Index ¶
- Constants
- func CloneCanonical(value any) (any, error)
- func CloneCanonicalMap(value map[string]any) (map[string]any, error)
- func DecodeClosed(raw []byte, target any) error
- func IsPositiveSafeUnsignedInteger(value uint64) bool
- func IsSafeUnsignedInteger(value uint64) bool
- func Normalize(value any) (normalized any, err error)
- func ValidateCanonical(value any) error
Constants ¶
View Source
const ( MaxCanonicalNodes = 32768 MaxSafeInteger = uint64(1<<53 - 1) )
Variables ¶
This section is empty.
Functions ¶
func CloneCanonical ¶
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 ¶
CloneCanonicalMap is the typed map form used at adapter and store boundaries.
func DecodeClosed ¶
DecodeClosed decodes exactly one JSON value, preserves numbers as json.Number, and rejects unknown struct fields and trailing values.
func IsSafeUnsignedInteger ¶
func ValidateCanonical ¶
ValidateCanonical enforces limits on the closed Go representation of a JSON value without invoking caller-defined encoding behavior.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.