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

Tony Water

by evercyan ALL

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

Labels json, utils

Details

Installs

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

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"`
}