Home

Awesome

ESJsonFormat-Xcode

将JSON格式化输出为模型的属性    个人活动范围>Weibo-EnjoySR

写在之前的注意

怎么安装:

方式1:下载-Xcode打开-Command+B-重启Xcode

方式2:通过Alcatraz安装,搜索 ESJsonFormat

方式3:下载-解压plugin文件夹中zip到~/Library/Application Support/Developer/Shared/Xcode/Plug-ins-重启Xcode

怎么使用:

Window-ESJsonFormat-输入Json-Enter OR 快捷键(Control+Shift+J)-输入JSON-Enter

Screenshot

关于设置:

Screenshot

打开方式:Xcode菜单-Window-ESJsonFormat-Setting

功能说明:

-0.1

-0.2

-0.3

-0.4

-0.5

Alcatraz

Screenshot

效果:

简单模型

Screenshot

复杂模型

Screenshot

图中的JSON格式

{
    "name": "王五",
    "gender": "man",
    "age": 15,
    "height": "140cm"
}
{
    "name": "王五",
    "gender": "man",
    "age": 15,
    "height": "140cm",
    "addr": {
        "province": "fujian",
        "city": "quanzhou",
        "code": "300000"
    },
    "hobby": [
        {
            "name": "billiards",
            "code": "1"
        },
        {
            "name": "computerGame",
            "code": "2"
        }
    ]
}

其他:

Thanks:GsonFormatVVDocumenter-XcodeMJExtension