Documentation
¶
Overview ¶
Package sourcepayload enforces bounded resource use before source decoding.
Index ¶
Constants ¶
View Source
const MaxJSONNestingDepth = 64
MaxJSONNestingDepth bounds object/array nesting before JSON decode.
Variables ¶
This section is empty.
Functions ¶
func ValidateJSON ¶
ValidateJSON enforces source byte and nesting limits before decoding.
Types ¶
type UnknownJSONField ¶
type UnknownJSONField struct {
Path string `json:"path" yaml:"path"`
Checksum string `json:"checksum" yaml:"checksum"`
}
UnknownJSONField is reviewable evidence for one additive source field that was not promoted into the typed schema.
func FingerprintValue ¶
func FingerprintValue(path string, value any) UnknownJSONField
FingerprintValue returns path/digest evidence for an unrecognized typed value.
func UnknownJSONFields ¶
func UnknownJSONFields(data []byte, schema any, prefix string) ([]UnknownJSONField, error)
UnknownJSONFields returns deterministic path/digest evidence for top-level JSON members not declared by schema. Raw values are intentionally omitted.
Click to show internal directories.
Click to hide internal directories.