# GsonFormat **Repository Path**: codeing_q/GsonFormat ## Basic Information - **Project Name**: GsonFormat - **Description**: 根据Gson库使用的要求,将JSONObject格式的String 解析成实体 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-01 - **Last Updated**: 2021-07-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README **写在前头:本插件只适用 android studio和 Intellij IDEA 工具,eclipse 的少年无视我吧!!!** 这是一个根据JSONObject格式的字符串,自动生成实体类参数. [github](https://github.com/zzz40500/GsonFormat) [jetbrains](https://plugins.jetbrains.com/plugin/7654?pr=androidstudio) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-GsonFormat-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/1896) [swift 版](https://github.com/EnjoySR/ESJsonFormat-Xcode); [Json 新视觉](https://github.com/tianzhijiexian/JsonAnnotation) ###**写在前头:本插件只适用 android studio和 Intellij IDEA 工具!!!** ##版本说明 版本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..搜索GsonFormat 2.安装插件,重启android studio ~~~ 方法2: [下载地址](https://plugins.jetbrains.com/plugin/7654?pr=androidstudio) ~~~ 1.下载 GsonFormat.jar , 2.Android studio File->Settings..->Plugins --> install plugin from disk..导入下载的 GsonFormat.jar , 3重启 android studio . ~~~ ##打开方法 1. 使用Generate的快捷键. 快捷键:图中选中的部分 ![Generate快捷键.png](http://upload-images.jianshu.io/upload_images/166866-2c5168c72b7155ba.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) * 使用 GsonFommat 的快捷键. 默认 option + s (mac), alt + s (win) 通过以下方式修改快捷键: ![修改快捷键.png](http://upload-images.jianshu.io/upload_images/166866-f9e20ca0ad7b9ae4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) #使用截图 # ![gsonFormat.gif](http://upload-images.jianshu.io/upload_images/166866-ff9dc336af72d7d7.gif?imageMogr2/auto-orient/strip)