jsonutils

package
v0.0.0-...-b36d24e Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: MulanPSL-2.0 Imports: 6 Imported by: 89

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Byte2JsonPretty

func Byte2JsonPretty(b []byte) string

func Check

func Check(self any, key string, exp any) bool

func Decode2Stru

func Decode2Stru(some, out any) error

func Decode2StruList

func Decode2StruList(some, out any) error

func FromJson

func FromJson(str string, obj any) error

func FromJsonByte

func FromJsonByte(inbyte []byte, obj any) error

func FromJsonStr

func FromJsonStr(param []byte) any

func JsonFromStr

func JsonFromStr(v string) string

func MapFromJson

func MapFromJson(param string) (m *map[string]any, err error)

func Parse2Map

func Parse2Map(src string) (map[string]any, error)

func ParseArray2Map

func ParseArray2Map(stru []any) (any, error)

func Str2JsonPretty

func Str2JsonPretty(txt string) string

func Stru2Map

func Stru2Map(stru any) map[string]any

func Stru2MapExclude

func Stru2MapExclude(stru any, excludeFields ...string) map[string]any

func ToJson

func ToJson(v any) (string, error)

func ToJsonBytes

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

func ToJsonPretty

func ToJsonPretty(v any) string

func ToJsonStr

func ToJsonStr(v any) string

Types

type JsonUtils

type JsonUtils struct {
}

Jump to

Keyboard shortcuts

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