jsonutil

package
v0.0.0-...-1285b0d Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

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

Types

type Decoder

type Decoder[T any] struct {
	*json.Decoder
}

func NewDecoder

func NewDecoder[T any](r io.Reader) *Decoder[T]

func (*Decoder[T]) Decode

func (d *Decoder[T]) Decode() (T, error)

type Scanner

type Scanner[T any] struct {
	*json.Decoder
	// contains filtered or unexported fields
}

func NewScanner

func NewScanner[T any](r io.Reader) *Scanner[T]

func (*Scanner[T]) Err

func (s *Scanner[T]) Err() error

func (*Scanner[T]) Scan

func (s *Scanner[T]) Scan() bool

func (*Scanner[T]) Value

func (s *Scanner[T]) Value() T

Jump to

Keyboard shortcuts

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