mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
20 lines
260 B
Go
20 lines
260 B
Go
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"github.com/gogf/gf/frame/g"
|
|
|
|
"github.com/gogf/gf/container/gmap"
|
|
)
|
|
|
|
func main() {
|
|
m := gmap.New()
|
|
m.Sets(g.MapAnyAny{
|
|
"name": "john",
|
|
"score": 100,
|
|
})
|
|
b, _ := json.Marshal(m)
|
|
fmt.Println(string(b))
|
|
}
|