strB, _ := json.Marshal("gopher") fmt.Println(string(strB)). And here are some for slices and maps, which encode to JSON arrays and objects as you'd expect.
確定! 回上一頁