Android studio插件GsonFormat 的使用

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yy471101598/article/details/73565086

GsonFormat作用:根据Gson库使用的要求,将JSONObject格式的String 解析成实体。

GsonFormat的github地址:https://github.com/zzz40500/GsonFormat

GsonFormat安装:Androidstudio的插件的安装都是一样的。

方法一:

1.Android studio
File->Settings..->Plugins–>Browse repositores..搜索GsonFormat

2.安装插件,重启android studio

方法二:

1.下载 GsonFormat.jar ,下载地址(其实插件的jar包都可以在这儿下载):https://plugins.jetbrains.com/plugin/7654?pr=androidstudio

2.Android studio File->Settings..->Plugins –>
install plugin from disk..导入下载的 GsonFormat.jar ,
3.重启 android studio.

GsonFormat的使用:

Alt+insert–>gsonformat

弹出框的那一栏gsonformat旁边又个alt+s就说明我下次打开格式化的的时候就直接用alt+s就Ok了。

先来个简单的。

右上角的format可以进行格式化的。在转换时候自己可以对类型是可以修改的。里面的setting也是可以设置的。

说明:gsonformat插件是能够识别注释的//和/*/,下面这种格式也能够正确转换的。

下面来点数据格式比较复杂的,即使复杂也能够转换得,有木有很强大。

基本的用法就到这里就结束了,赶紧动起来吧。来试试这个强大过的工具。

猜你喜欢

转载自blog.csdn.net/yy471101598/article/details/73565086