parsejson

package
v0.0.0-...-4a4b955 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Json2List

func Json2List[T interface{}](jsonData string) (*[]T, error)

Json2List @params jsonData: json string @description Parse `[1,1,1]` to []int{1,1,1} the parameter can be any or interface{} @author xvwen @return []T

func Json2Struct

func Json2Struct[T interface{}](jsonData string) (*T, error)

Json2Struct 解析json字符串为结构体 @auther xvwen @param jsonData json字符串 `{"name","xvwen","blog":"www.baidu.com"}` @desc 解析json字符串为结构体 @return *T 结构体指针, error

func Json2StructList

func Json2StructList[T interface{}](jsonData string) (*[]T, error)

Json2StructList 解析json字符串为结构体切片 @auther xvwen @param jsonData json字符串 `{"name","xvwen","blog":"www.baidu.com"}` @desc 解析json字符串为结构体切片 @return *[]T 结构体切片指针, error

Types

This section is empty.

Jump to

Keyboard shortcuts

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