golang:map转json字符串

m :=map[string]string{"type":"10","msg":"hello."}

mjson,_ :=json.Marshal(m)

mString :=string(mjson)

fmt.Printf("print mString:%s",mString)

你可能感兴趣的:(Go语言)