浏览 JSON2Go Sublime插件:将JSON字符串转换为Go结构体
安装次数 总数 389 Win 0 Mac 389 Linux 0 8月6日 8月5日 8月4日 8月3日 8月2日 8月1日 7月31日 7月30日 7月29日 7月28日 7月27日 7月26日 7月25日 7月24日 7月23日 7月22日 7月21日 7月20日 7月19日 7月18日 7月17日 7月16日 7月15日 7月14日 7月13日 7月12日 7月11日 7月10日 7月9日 7月8日 7月7日 7月6日 7月5日 7月4日 7月3日 7月2日 7月1日 6月30日 6月29日 6月28日 6月27日 6月26日 6月25日 6月24日 6月23日 Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 2 3 4 8月6日 8月3日 7月31日 7月28日 7月25日 7月22日 7月19日 7月16日 7月13日 7月10日 7月7日 7月4日 7月1日 6月28日 6月25日 8月6日
Linux: 0
Mac: 0
Windows: 0 8月5日
Linux: 0
Mac: 0
Windows: 0 8月4日
Linux: 0
Mac: 0
Windows: 0 8月3日
Linux: 0
Mac: 0
Windows: 0 8月2日
Linux: 0
Mac: 0
Windows: 0 8月1日
Linux: 0
Mac: 0
Windows: 0 7月31日
Linux: 0
Mac: 0
Windows: 0 7月30日
Linux: 0
Mac: 0
Windows: 0 7月29日
Linux: 0
Mac: 0
Windows: 0 7月28日
Linux: 0
Mac: 0
Windows: 0 7月27日
Linux: 0
Mac: 0
Windows: 0 7月26日
Linux: 0
Mac: 0
Windows: 0 7月25日
Linux: 0
Mac: 0
Windows: 0 7月24日
Linux: 0
Mac: 0
Windows: 0 7月23日
Linux: 0
Mac: 0
Windows: 0 7月22日
Linux: 0
Mac: 0
Windows: 0 7月21日
Linux: 0
Mac: 0
Windows: 0 7月20日
Linux: 0
Mac: 0
Windows: 0 7月19日
Linux: 0
Mac: 0
Windows: 0 7月18日
Linux: 0
Mac: 0
Windows: 0 7月17日
Linux: 0
Mac: 0
Windows: 0 7月16日
Linux: 0
Mac: 0
Windows: 0 7月15日
Linux: 0
Mac: 0
Windows: 0 7月14日
Linux: 0
Mac: 0
Windows: 0 7月13日
Linux: 0
Mac: 0
Windows: 0 7月12日
Linux: 0
Mac: 0
Windows: 0 7月11日
Linux: 0
Mac: 0
Windows: 0 7月10日
Linux: 0
Mac: 0
Windows: 0 7月9日
Linux: 0
Mac: 0
Windows: 0 7月8日
Linux: 0
Mac: 0
Windows: 0 7月7日
Linux: 0
Mac: 0
Windows: 0 7月6日
Linux: 0
Mac: 0
Windows: 0 7月5日
Linux: 0
Mac: 0
Windows: 0 7月4日
Linux: 0
Mac: 0
Windows: 0 7月3日
Linux: 0
Mac: 0
Windows: 0 7月2日
Linux: 0
Mac: 0
Windows: 0 7月1日
Linux: 0
Mac: 0
Windows: 0 6月30日
Linux: 0
Mac: 0
Windows: 0 6月29日
Linux: 0
Mac: 0
Windows: 0 6月28日
Linux: 0
Mac: 0
Windows: 0 6月27日
Linux: 0
Mac: 0
Windows: 0 6月26日
Linux: 0
Mac: 0
Windows: 0 6月25日
Linux: 0
Mac: 0
Windows: 0 6月24日
Linux: 0
Mac: 0
Windows: 0 6月23日
Linux: 0
Mac: 0
Windows: 0 8月6日
Linux: 0
Mac: 0
Windows: 0 8月5日
Linux: 0
Mac: 0
Windows: 0 8月4日
Linux: 0
Mac: 0
Windows: 0 8月3日
Linux: 0
Mac: 0
Windows: 0 8月2日
Linux: 0
Mac: 0
Windows: 0 8月1日
Linux: 0
Mac: 0
Windows: 0 7月31日
Linux: 0
Mac: 0
Windows: 0 7月30日
Linux: 0
Mac: 0
Windows: 0 7月29日
Linux: 0
Mac: 0
Windows: 0 7月28日
Linux: 0
Mac: 0
Windows: 0 7月27日
Linux: 0
Mac: 0
Windows: 0 7月26日
Linux: 0
Mac: 0
Windows: 0 7月25日
Linux: 0
Mac: 0
Windows: 0 7月24日
Linux: 0
Mac: 0
Windows: 0 7月23日
Linux: 0
Mac: 0
Windows: 0 7月22日
Linux: 0
Mac: 0
Windows: 0 7月21日
Linux: 0
Mac: 0
Windows: 0 7月20日
Linux: 0
Mac: 0
Windows: 0 7月19日
Linux: 0
Mac: 0
Windows: 0 7月18日
Linux: 0
Mac: 0
Windows: 0 7月17日
Linux: 0
Mac: 0
Windows: 0 7月16日
Linux: 0
Mac: 0
Windows: 0 7月15日
Linux: 0
Mac: 0
Windows: 0 7月14日
Linux: 0
Mac: 0
Windows: 0 7月13日
Linux: 0
Mac: 0
Windows: 0 7月12日
Linux: 0
Mac: 0
Windows: 0 7月11日
Linux: 0
Mac: 0
Windows: 0 7月10日
Linux: 0
Mac: 0
Windows: 0 7月9日
Linux: 0
Mac: 0
Windows: 0 7月8日
Linux: 0
Mac: 0
Windows: 0 7月7日
Linux: 0
Mac: 0
Windows: 0 7月6日
Linux: 0
Mac: 0
Windows: 0 7月5日
Linux: 0
Mac: 0
Windows: 0 7月4日
Linux: 0
Mac: 0
Windows: 0 7月3日
Linux: 0
Mac: 0
Windows: 0 7月2日
Linux: 0
Mac: 0
Windows: 0 7月1日
Linux: 0
Mac: 0
Windows: 0 6月30日
Linux: 0
Mac: 0
Windows: 0 6月29日
Linux: 0
Mac: 0
Windows: 0 6月28日
Linux: 0
Mac: 0
Windows: 0 6月27日
Linux: 0
Mac: 0
Windows: 0 6月26日
Linux: 0
Mac: 0
Windows: 0 6月25日
Linux: 0
Mac: 0
Windows: 0 6月24日
Linux: 0
Mac: 0
Windows: 0 6月23日
Linux: 0
Mac: 0
Windows: 0 8月6日
Linux: 0
Mac: 0
Windows: 0 8月5日
Linux: 0
Mac: 0
Windows: 0 8月4日
Linux: 0
Mac: 0
Windows: 0 8月3日
Linux: 0
Mac: 0
Windows: 0 8月2日
Linux: 0
Mac: 0
Windows: 0 8月1日
Linux: 0
Mac: 0
Windows: 0 7月31日
Linux: 0
Mac: 0
Windows: 0 7月30日
Linux: 0
Mac: 0
Windows: 0 7月29日
Linux: 0
Mac: 0
Windows: 0 7月28日
Linux: 0
Mac: 0
Windows: 0 7月27日
Linux: 0
Mac: 0
Windows: 0 7月26日
Linux: 0
Mac: 0
Windows: 0 7月25日
Linux: 0
Mac: 0
Windows: 0 7月24日
Linux: 0
Mac: 0
Windows: 0 7月23日
Linux: 0
Mac: 0
Windows: 0 7月22日
Linux: 0
Mac: 0
Windows: 0 7月21日
Linux: 0
Mac: 0
Windows: 0 7月20日
Linux: 0
Mac: 0
Windows: 0 7月19日
Linux: 0
Mac: 0
Windows: 0 7月18日
Linux: 0
Mac: 0
Windows: 0 7月17日
Linux: 0
Mac: 0
Windows: 0 7月16日
Linux: 0
Mac: 0
Windows: 0 7月15日
Linux: 0
Mac: 0
Windows: 0 7月14日
Linux: 0
Mac: 0
Windows: 0 7月13日
Linux: 0
Mac: 0
Windows: 0 7月12日
Linux: 0
Mac: 0
Windows: 0 7月11日
Linux: 0
Mac: 0
Windows: 0 7月10日
Linux: 0
Mac: 0
Windows: 0 7月9日
Linux: 0
Mac: 0
Windows: 0 7月8日
Linux: 0
Mac: 0
Windows: 0 7月7日
Linux: 0
Mac: 0
Windows: 0 7月6日
Linux: 0
Mac: 0
Windows: 0 7月5日
Linux: 0
Mac: 0
Windows: 0 7月4日
Linux: 0
Mac: 0
Windows: 0 7月3日
Linux: 0
Mac: 0
Windows: 0 7月2日
Linux: 0
Mac: 0
Windows: 0 7月1日
Linux: 0
Mac: 0
Windows: 0 6月30日
Linux: 0
Mac: 0
Windows: 0 6月29日
Linux: 0
Mac: 0
Windows: 0 6月28日
Linux: 0
Mac: 0
Windows: 0 6月27日
Linux: 0
Mac: 0
Windows: 0 6月26日
Linux: 0
Mac: 0
Windows: 0 6月25日
Linux: 0
Mac: 0
Windows: 0 6月24日
Linux: 0
Mac: 0
Windows: 0 6月23日
Linux: 0
Mac: 0
Windows: 0
说明文件 源代码 raw.githubusercontent.com JSON2Go
一个Sublime插件可以将JSON字符串转换为Go结构体定义
示例
{
"name": "ryan",
"info": [
1, 2, "3"
],
"detail": {
"age": 20,
"height": "172cm"
},
"som":[
{
"aaa": 1,
"bbb": 4
},
{
"bbb": "2",
"ccc": [
{
"a": [
"what"
],
"b": {
"name":"1"
},
"c":"c"
}
]
}
]
}
To:
type Demo struct {
Detail struct {
Height string `json:"height"`
Age int `json:"age"`
} `json:"detail"`
Info []interface{} `json:"info"`
Som []struct {
Ccc []struct {
B struct {
Name string `json:"name"`
} `json:"b"`
C string `json:"c"`
A []string `json:"a"`
} `json:"ccc"`
Bbb interface{} `json:"bbb"`
Aaa int `json:"aaa"`
} `json:"som"`
Name string `json:"name"`
}
安装
MacOs:
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone https://github.com/everCyan/JSON2Go
Package Control: Install Package
input `JSON2GO`
菜单
right click, the menu like this:
- JSON2Go
- JSON2Go translate JSON string to Go struct
- ToUpper translate to upper
- ToLower translate to lower
- JsonExpand translate one line json string to BASIC json struct
- JsonShrink translate json struct to one line json string
- StrEscape escape str
- StrUnescape unescape str
- UrlEncode encode url
- UrlDecode decode url
Help (JSON2Go js): https://github.com/mholt/json-to-go