mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
15 lines
208 B
Go
15 lines
208 B
Go
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
|
|
}
|