safe_json

package
v1.2.26 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From added in v1.2.15

func From(s string, v any)

func Pretty added in v1.2.15

func Pretty(v any) string

func SafeDecoder

func SafeDecoder(rd io.Reader) util.JSONDecoder

func SafeEncoder

func SafeEncoder(wr io.Writer) util.JSONEncoder

func SafeMarshal

func SafeMarshal(v any) ([]byte, error)

func SafeMarshalPretty

func SafeMarshalPretty(v any) ([]byte, error)

func SafeUnmarshal

func SafeUnmarshal(b []byte, v any) error

func String added in v1.2.15

func String(v any) string

Types

type Expansion added in v1.2.22

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

Expansion parse ob to ov expand ov to nv marshal nv to nb

func ExpandFromBytes added in v1.2.22

func ExpandFromBytes(b []byte, o ...ExpansionOption) *Expansion

func (*Expansion) Marshal added in v1.2.22

func (e *Expansion) Marshal() []byte

type ExpansionOption added in v1.2.22

type ExpansionOption func(e *Expansion)

func WithIgnoreNull added in v1.2.22

func WithIgnoreNull() ExpansionOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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