func main() {
m := make(map[string]string, 0)
m["phone"] = "15656565656"
json, err := json.Marshal(m)
if err != nil {
fmt.Printf("err:%v\n",err)
}
fmt.Printf("未转义字符串:%v\n",json)
strJson := strconv.Quote(string(json))
fmt.Printf("转义字符串:%v\n",strJson)
}
//未转义字符串:[123 34 112 104 111 110 101 34 58 34 49 53 54 53 54 53 54 53 54 53 54 34 125]
//转义字符串:"{\"phone\":\"15656565656\"}"