Skip to content

Commit 7c1cf85

Browse files
author
seal
committed
Release version 1.3
1 parent f263ab2 commit 7c1cf85

File tree

1 file changed

+33
-19
lines changed

1 file changed

+33
-19
lines changed

README.md

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ I am a plugin for Kotlin generate Kotlin data class code from a json string
66
I am a plugin for Kotlin to convert Json String into Kotlin data class code (Json to Kotlin)
77

88
### Update Log
9+
#### 1.3
10+
* 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).
11+
* Add property could be nullable option in property tab.
12+
* Fix a bug when the property name is 'list' and it's type is array then the plugin will broken.
13+
* Beautify dialog layout.
914

1015
#### 1.2.1
1116
* 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
2631
#### Default:
2732
![alt text](https://plugins.jetbrains.com/files/9960/screenshot_17340.png)
2833

29-
#### Config with gson support on
34+
#### Config with Gson support on and init with deault value on
3035

31-
![alt text](https://plugins.jetbrains.com/files/9960/screenshot_17341.png)
36+
![alt text](https://plugins.jetbrains.com/files/9960/screenshot_17359.png)
3237

3338
### Generate Example
34-
* example with none json lib support and comment option on
39+
* Example with none json lib support and comment option on
3540

3641
```kotlin
3742
data class FD(
@@ -59,24 +64,28 @@ I am a plugin for Kotlin to convert Json String into Kotlin data class code (Jso
5964
)
6065

6166
```
62-
* example with gson option on
67+
* Example with gson option on and init with default value option on
6368

6469
```kotlin
65-
data class FD(
66-
@SerializedName("214123addre++/-*ssbook") val addressbook: List<addressbook>
67-
)
68-
69-
data class addressbook(
70-
@SerializedName("*-/-+address") val address: address,
71-
@SerializedName("name") val name: String, //Ann Michaels
72-
@SerializedName("phoneNumbers") val phoneNumbers: List<String>
73-
)
74-
75-
data class address(
76-
@SerializedName("city") val city: List<String>,
77-
@SerializedName("*-/32432-*/4street") val street: List<String>,
78-
@SerializedName("zip") val zip: List<Int>
79-
)
70+
71+
data class TestData(
72+
@SerializedName("ticketInfo") val ticketInfo: TicketInfo = TicketInfo(),
73+
@SerializedName("trainInfo") val trainInfo: TrainInfo = TrainInfo(),
74+
@SerializedName("trainScheduleHead") val trainScheduleHead: List<String> = listOf(),
75+
@SerializedName("extInfo") val extInfo: ExtInfo = ExtInfo(),
76+
@SerializedName("trainScheduleBody") val trainScheduleBody: List<TrainScheduleBody> = listOf()
77+
)
78+
79+
data class TrainScheduleBody(
80+
@SerializedName("mxl") val mxl: Long = 0, //12490639969101
81+
@SerializedName("content") val content: List<Int> = listOf()
82+
)
83+
84+
data class TrainInfo(
85+
@SerializedName("T110") val t110: T110 = T110()
86+
)
87+
88+
8089
```
8190

8291
### More Detail Document
@@ -86,5 +95,10 @@ I am a plugin for Kotlin to convert Json String into Kotlin data class code (Jso
8695
* Welcome anyone to raise new issue.
8796
* Welcome anyone to push a pull request to improve me.
8897

98+
### Thanks
99+
* Thank [@davidbilik](https://github.com/davidbilik) give me first awesome advice.
100+
* Thank [@cgoodroe](https://github.com/cgoodroe) raise many awesome issues for me,Help me improve myself
101+
* Thank [@wangzhenguang](https://github.com/wangzhenguang) remaining the details of the problem
102+
89103
### Find me useful ? :heart:
90104
* Support me by clicking the :star: button on the upper right of this page. :v:

0 commit comments

Comments
 (0)