Android Studio插件 - GsonFormat快速实
2020-10-11 本文已影响0人
KingWorld
在Android中,我们网络请求到的结果均是Json数据,所以我们往往需要javaBean的实体类去中转数据格式,解析Xml,所以在AndroidStudio中有了GsonFormat插件,大大的提升了我们的效率,减少了浪费在写javaBean的时间,下面我为大家带来的就是GsonFormat的使用。

1.点击设置,也可按快捷键Ctrl+Alt+S

2.在这里我们输入GsonFormat查找插件

3.因为没有安装,所以我们需要进行搜索GsonFormat

4.找到之后,进行下载,安装,然后重启AndroidStudio

5.创建一个Javabean类后,Alt+Insert生成GsonFormat


6.先去修改一下转换类型


6.准备一段Json数据的XML,其中的参数类型与名字可自己更改


7.完美落幕
