jsonutil

package
v0.0.0-...-98965d2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package jsonutil centralizes the repository's encoding/json/v2 policy.

Index

Constants

This section is empty.

Variables

View Source
var (

	// Default preserves arbitrary JSON numbers without losing integer precision.
	Default = Decoder{/* contains filtered or unexported fields */}

	// Strict also rejects object members unknown to the target Go type.
	Strict = Decoder{
			// contains filtered or unexported fields
	}
)

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

Decoder applies a reusable set of JSON decoding options.

func (Decoder) Decode

func (decoder Decoder) Decode[T any](reader io.Reader) (T, error)

Decode reads exactly one JSON document into a value of T.

func (Decoder) DecodeInto

func (decoder Decoder) DecodeInto(reader io.Reader, value any) error

DecodeInto reads exactly one JSON document into value.

Jump to

Keyboard shortcuts

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