Skip to content

Commit

Permalink
Release version 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
seal committed Sep 27, 2017
1 parent f263ab2 commit 7c1cf85
Showing 1 changed file with 33 additions and 19 deletions.
52 changes: 33 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down Expand Up @@ -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<addressbook>
)

data class addressbook(
@SerializedName("*-/-+address") val address: address,
@SerializedName("name") val name: String, //Ann Michaels
@SerializedName("phoneNumbers") val phoneNumbers: List<String>
)

data class address(
@SerializedName("city") val city: List<String>,
@SerializedName("*-/32432-*/4street") val street: List<String>,
@SerializedName("zip") val zip: List<Int>
)

data class TestData(
@SerializedName("ticketInfo") val ticketInfo: TicketInfo = TicketInfo(),
@SerializedName("trainInfo") val trainInfo: TrainInfo = TrainInfo(),
@SerializedName("trainScheduleHead") val trainScheduleHead: List<String> = listOf(),
@SerializedName("extInfo") val extInfo: ExtInfo = ExtInfo(),
@SerializedName("trainScheduleBody") val trainScheduleBody: List<TrainScheduleBody> = listOf()
)

data class TrainScheduleBody(
@SerializedName("mxl") val mxl: Long = 0, //12490639969101
@SerializedName("content") val content: List<Int> = listOf()
)

data class TrainInfo(
@SerializedName("T110") val t110: T110 = T110()
)


```

### More Detail Document
Expand All @@ -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:

0 comments on commit 7c1cf85

Please sign in to comment.