import ( "strconv" ) int i = 10 str1 := strconv.Itoa(i)
import ( "encoding/json" ) type Server struct { ServerName string ServerIP string } b, err := json.Marshal(s) if err != nil { fmt.Println("json err:", err) } fmt.Println(string(b))
未完待續json