safe_json

package
v1.2.37 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes added in v1.2.30

func Bytes(v any) []byte

func From added in v1.2.15

func From(s string, v any)

func Goccy added in v1.2.29

func Goccy() goccy

func Jsoniter added in v1.2.29

func Jsoniter() jsonIter

func Pretty added in v1.2.15

func Pretty(v any) string

func STD added in v1.2.29

func STD() std

func SafeConfig added in v1.2.29

func SafeConfig() jsoniter.API

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