github.com/webx-top/com@v1.2.12/encoding/json/json_test.go (about) 1 package json 2 3 import ( 4 "fmt" 5 "testing" 6 ) 7 8 func TestJSON(t *testing.T) { 9 b, err := Marshal(map[string]interface{}{ 10 `first`: 1, 11 `yes`: true, 12 }) 13 if err != nil { 14 t.Fatal(err) 15 } 16 fmt.Println(string(b)) 17 }