jsonutil

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonToMap

func JsonToMap(jsonstr string) (map[string]interface{}, error)

json 格式转map 字典

func JsonToStruct

func JsonToStruct(jsonstr string, tar interface{}) (interface{}, error)

json 字符串转struct 对象

func ListMapToJson

func ListMapToJson(data []map[string]interface{}) (string, error)

listmap 转json 字符串

func ListModelToJson

func ListModelToJson(data []sysmodel.Sys_UserWeiXin) (string, error)

func MapToJson

func MapToJson(data map[string]interface{}) (string, error)

map 转json 字符串

func ObjToJson

func ObjToJson(data interface{}) (string, error)

通用 转json

func StrToJson

func StrToJson(json string) (*fastjson.Value, error)

字符串转 fastjson

func StructListToJson

func StructListToJson(data []interface{}) (string, error)

struct 数组转json

func StructToJson

func StructToJson(data interface{}) (string, error)

struct 数组转json

Types

This section is empty.

Jump to

Keyboard shortcuts

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