ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Tony Water

by evercyan ALL

一个拖泥带水的 sublime-text 插件

Labels json, utils

Details

Installs

  • Total 28
  • Win 14
  • Mac 13
  • Linux 1
Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6
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 1 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 1 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

Readme

Source
raw.​githubusercontent.​com

How to install?

  • Sublime 插件安装, 搜索 Tony Water
  • MacOS 手动安装
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone https://github.com/evercyan/tony-water

How to use?

  • 编辑区, 右键

tony-water-menu

  • 配置快捷键

具体 commandDefault.sublime-commands


Something else?

将 JSON 字符串翻译成 Golang struct, e.g.

{
    "firstName": "ryan",
    "info": [
        1, 2, "3"
    ],
    "detailInfo": {
        "age": 20,
        "height": "172cm"
    },
    "som":[
        {
            "aaa": 1,
            "bbb": 4
        },
        {
            "bbb": "2",
            "ccc": [
                {
                    "a": [
                        "what"
                    ],
                    "b": {
                        "name": "1"
                    },
                    "c": "c"
                }
            ]
        }
    ]
}
type JSON2Go struct {
    Som []struct {
        Bbb interface{} `json:"bbb"`
        Ccc []struct {
            A []string `json:"a"`
            C string `json:"c"`
            B struct {
                Name string `json:"name"`
            } `json:"b"`
        } `json:"ccc"`
        Aaa int `json:"aaa"`
    } `json:"som"`
    Info []interface{} `json:"info"`
    FirstName string `json:"first_name"`
    DetailInfo struct {
        Height string `json:"height"`
        Age int `json:"age"`
    } `json:"detail_info"`
}