configjson

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package configjson decodes configuration objects whose member names are case-insensitive, including provider-owned JSON nested in a document.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRepeatedMember = errors.New("repeated configuration member")
)

Functions

func Decode

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

Decode leaves field selection and custom unmarshaling to encoding/json. The additional pass enforces one member policy throughout the document, including RawMessage values that will be decoded by another owner.

Types

type RepeatedMemberDetail added in v0.1.8

type RepeatedMemberDetail struct {
	Name            string
	Location        string
	CaseInsensitive bool
}

RepeatedMemberDetail carries structured location and key metadata for ErrRepeatedMember without exposing any document values.

func RepeatedMember added in v0.1.8

func RepeatedMember(err error) (RepeatedMemberDetail, bool)

RepeatedMember extracts structured key/path metadata when err wraps ErrRepeatedMember.

Jump to

Keyboard shortcuts

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