提交kit/utils

Signed-off-by: lixxxww <941403820@qq.com>
This commit is contained in:
lixxxww
2024-01-23 11:57:42 +00:00
committed by Gitee
parent c456d1249e
commit 0ff66b9d43
19 changed files with 1550 additions and 0 deletions

14
kit/utils/json_utils.go Normal file
View File

@@ -0,0 +1,14 @@
package utils
import (
"encoding/json"
)
func Json2Map(jsonStr string) map[string]any {
var res map[string]any
if jsonStr == "" {
return res
}
_ = json.Unmarshal([]byte(jsonStr), &res)
return res
}