JSon实体类快速生成插件 GsonFormat 1.2.2
2016-09-07 本文已影响253人
Maple_Xu
写在前头:本插件只适用 android studio和 Intellij IDEA 工具!!!
这是根据JSONObject格式的字符串,自动生成实体类.
版本更新说明
版本1.2.2
支持 field 类型的修改.
支持快捷键打开 GsonFormat ,默认为 option+s(mac), alt+s(win)
支持 field 名称的修改.
支持添加 field 前缀.
支持多种转换库 (Gson,Jackjson,FastJson,LoganSquare).
支持 private 和 public 两种模式.
支持过滤父类已有属性.
安装方法
方法1:
1.Android studio File->Settings..->Plugins-->Browse repositores..搜索GsonFormat2.安装插件,重启android studio
方法2:下载地址
1.下载GsonFormat.jar, 2.AndroidstudioFile->Settings..->Plugins-->installpluginfromdisk..导入下载的GsonFormat.jar, 3重启androidstudio.
打开方法
使用Generate的快捷键.
快捷键:图中选中的部分

我这边的快捷键是 command+n;
使用 GsonFommat 的快捷键.
默认 option + s (mac), alt + s (mac)
通过以下方式修改快捷键:

使用截图

文/轻微(简书作者)
原文链接:http://www.jianshu.com/p/b83ea5e32ee1
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。