From 7c1cf856628e52eb24801293c039c55fbd25efdd Mon Sep 17 00:00:00 2001 From: seal Date: Wed, 27 Sep 2017 14:59:32 +0800 Subject: [PATCH] Release version 1.3 --- README.md | 52 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 53910e96..f63279d9 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,11 @@ I am a plugin for Kotlin generate Kotlin data class code from a json string I am a plugin for Kotlin to convert Json String into Kotlin data class code (Json to Kotlin) ### Update Log +#### 1.3 + * Add property init with default value option in property tab.(Recommend to select,with this selected you can avoid NullPointException in the following time,You can also unSelect the nullable option to avoid null check when use the data value). + * Add property could be nullable option in property tab. + * Fix a bug when the property name is 'list' and it's type is array then the plugin will broken. + * Beautify dialog layout. #### 1.2.1 * Fix insert improt class code upon package declare @@ -26,12 +31,12 @@ I am a plugin for Kotlin to convert Json String into Kotlin data class code (Jso #### Default: ![alt text](https://plugins.jetbrains.com/files/9960/screenshot_17340.png) -#### Config with gson support on +#### Config with Gson support on and init with deault value on -![alt text](https://plugins.jetbrains.com/files/9960/screenshot_17341.png) +![alt text](https://plugins.jetbrains.com/files/9960/screenshot_17359.png) ### Generate Example -* example with none json lib support and comment option on +* Example with none json lib support and comment option on ```kotlin data class FD( @@ -59,24 +64,28 @@ I am a plugin for Kotlin to convert Json String into Kotlin data class code (Jso ) ``` -* example with gson option on +* Example with gson option on and init with default value option on ```kotlin - data class FD( - @SerializedName("214123addre++/-*ssbook") val addressbook: List - ) - - data class addressbook( - @SerializedName("*-/-+address") val address: address, - @SerializedName("name") val name: String, //Ann Michaels - @SerializedName("phoneNumbers") val phoneNumbers: List - ) - - data class address( - @SerializedName("city") val city: List, - @SerializedName("*-/32432-*/4street") val street: List, - @SerializedName("zip") val zip: List - ) + + data class TestData( + @SerializedName("ticketInfo") val ticketInfo: TicketInfo = TicketInfo(), + @SerializedName("trainInfo") val trainInfo: TrainInfo = TrainInfo(), + @SerializedName("trainScheduleHead") val trainScheduleHead: List = listOf(), + @SerializedName("extInfo") val extInfo: ExtInfo = ExtInfo(), + @SerializedName("trainScheduleBody") val trainScheduleBody: List = listOf() + ) + + data class TrainScheduleBody( + @SerializedName("mxl") val mxl: Long = 0, //12490639969101 + @SerializedName("content") val content: List = listOf() + ) + + data class TrainInfo( + @SerializedName("T110") val t110: T110 = T110() + ) + + ``` ### More Detail Document @@ -86,5 +95,10 @@ I am a plugin for Kotlin to convert Json String into Kotlin data class code (Jso * Welcome anyone to raise new issue. * Welcome anyone to push a pull request to improve me. +### Thanks +* Thank [@davidbilik](https://github.com/davidbilik) give me first awesome advice. +* Thank [@cgoodroe](https://github.com/cgoodroe) raise many awesome issues for me,Help me improve myself +* Thank [@wangzhenguang](https://github.com/wangzhenguang) remaining the details of the problem + ### Find me useful ? :heart: * Support me by clicking the :star: button on the upper right of this page. :v: