jsoncodec

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBytes         = maxJSONBytes
	MaxDepth         = maxJSONDepth
	MaxObjectMembers = maxJSONObjectMembers
)

Implementation limits shared by the public facade and policy codec.

Variables

View Source
var (
	ErrMemberLimit = errJSONMemberLimit
	ErrDepthLimit  = errJSONDepthLimit
)

These aliases preserve errors.Is identity through the public facade.

Functions

func DecodeValue

func DecodeValue(data []byte) (any, error)

DecodeValue retains json.Number values for semantic comparisons.

func Marshal

func Marshal(value any) ([]byte, error)

Marshal serializes value as JSON Canonicalization Scheme (JCS) JSON.

func SameExactValue

func SameExactValue(a, b any) bool

SameExactValue compares JSON numbers by their exact rational values.

func Unmarshal

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

Unmarshal decodes one strict AgentSuite JSON document.

It rejects duplicate or unknown fields, invalid UTF-8, lossy JCS number representations, trailing values, and documents exceeding the format's declared implementation limits.

Types

This section is empty.

Jump to

Keyboard shortcuts

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