Help us shape the future of Go! Take the 2026 Go Developer Survey

json

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(payload any) ([]byte, error)

func MarshalTo

func MarshalTo(ctx context.Context, file string, payload any, options ...MarshalOption) (err error)

func ModifyAfterUnmarshal

func ModifyAfterUnmarshal[T any](modifier func(target *T)) *json.Unmarshalers

func Unmarshal

func Unmarshal(in []byte, out any) error

func UnmarshalFrom

func UnmarshalFrom(ctx context.Context, file string, out any, unmarshalers ...*json.Unmarshalers) (err error)

Types

type MarshalOption

type MarshalOption func(opts *marshalOptions)

func UserOnlyFilePerms

func UserOnlyFilePerms() MarshalOption

UserOnlyFilePerms is for a file that holds a credential, or a token minted from one.

Jump to

Keyboard shortcuts

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