jsonx

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package jsonx provides strict JSON decoding for internal stores and protocols.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDuplicateKey means an object declares the same key more than once.
	ErrDuplicateKey = errors.New("json: duplicate object key")
	// ErrMultipleValues means input contains more than one top-level value.
	ErrMultipleValues = errors.New("json: multiple values")
)

Functions

func Decode

func Decode(data []byte, target any) error

Decode decodes exactly one JSON value, rejects duplicate keys at every nesting level, and disallows fields unknown to target.

Types

This section is empty.

Jump to

Keyboard shortcuts

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