json

package
v0.13.9 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisallowUnknownFields

func DisallowUnknownFields(d *json.Decoder) *json.Decoder

DisallowUnknownFields configures the JSON decoder to error out if unknown fields come along, instead of dropping them by default.

func IsJSON

func IsJSON(j []byte) bool

IsJSON tests whether or not the suppied byte array is valid JSON

func Unmarshal

func Unmarshal(j []byte, o interface{}, opts ...JSONOpt) error

Unmarshal is a convenience wrapper around json.Unmarshal to support json decode options

func UnmarshalStrict

func UnmarshalStrict(j []byte, o interface{}) error

UnmarshalStrict is a convenience wrapper around json.Unmarshal with strict unmarshal options

Types

type JSONOpt

type JSONOpt func(*json.Decoder) *json.Decoder

JSONOpt is a decoding option for decoding from JSON format.

Jump to

Keyboard shortcuts

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