mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-02 23:40:24 +08:00
15 lines
224 B
Go
15 lines
224 B
Go
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
|
|
}
|