sourcepayload

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

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

func ValidateJSON(data []byte) error

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.

Jump to

Keyboard shortcuts

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