mirror of
https://gitee.com/johng/gf.git
synced 2024-12-01 03:38:35 +08:00
15 lines
209 B
Go
15 lines
209 B
Go
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"github.com/gogf/gf/container/gmap"
|
|
)
|
|
|
|
func main() {
|
|
m := gmap.Map{}
|
|
s := []byte(`{"name":"john","score":100}`)
|
|
json.Unmarshal(s, &m)
|
|
fmt.Println(m.Map())
|
|
}
|