mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-01 05:20:24 +08:00
refactor: 后端包结构重构、去除无用的文件
This commit is contained in:
14
server/pkg/utils/json_utils.go
Normal file
14
server/pkg/utils/json_utils.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
func Json2Map(jsonStr string) map[string]interface{} {
|
||||
var res map[string]interface{}
|
||||
if jsonStr == "" {
|
||||
return res
|
||||
}
|
||||
_ = json.Unmarshal([]byte(jsonStr), &res)
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user