1. 首页
  2. 主题
  3. Go基础

[URL] Encode 问题

cq441745656 · · 5424 次点击
代码很简单: ``` URL, _ := url.Parse("{\"a\":1},{\"b\":2}") fmt.Println(url.Parse(URL.String())) ``` 输出:%7B%22a_=%22:1%7D,%7B%22b%22:2%7D <nil> golang 怎么才能encodeURIComponent
http://docs.studygolang.com/pkg/net/url/ 上面的 Values.Encode 能解决你的需求吗?
#1
更多评论
不可以。但是我找到其他的方法了。 `func QueryEscape(s string) string`
#2

用户登录

没有账号?注册

今日阅读排行

    加载中

一周阅读排行

    加载中