You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@JsonProperty("address") lateinitvar primaryAddress:String// set after construction
136
+
var createdDt:DateTime by Delegates.notNull() // set after construction
137
+
var neverSetProperty:String?=null// not in JSON so must be nullable with default
138
+
}
139
139
```
140
140
141
141
Note that using `lateinit` or `Delegates.notNull()` will ensure that the value is never `null` when read, while letting it be instantiated after the construction of the class.
@@ -173,11 +173,11 @@ at compile-time to Kotlin. This makes `com.fasterxml.jackson.annotation.JsonSubT
173
173
A `com.fasterxml.jackson.annotation.@JsonTypeInfo` annotation at the base-class is still necessary.
174
174
175
175
```kotlin
176
-
@JsonTypeInfo(use =JsonTypeInfo.Id.NAME)
177
-
sealedclassSuperClass{
178
-
classA: SuperClass()
179
-
classB: SuperClass()
180
-
}
176
+
@JsonTypeInfo(use =JsonTypeInfo.Id.NAME)
177
+
sealedclassSuperClass{
178
+
classA: SuperClass()
179
+
classB: SuperClass()
180
+
}
181
181
182
182
...
183
183
val mapper = jacksonObjectMapper()
@@ -188,7 +188,6 @@ when(root){
188
188
}
189
189
```
190
190
191
-
192
191
# Configuration
193
192
194
193
The Kotlin module may be given a few configuration parameters at construction time;
@@ -255,8 +254,8 @@ See the [main Jackson contribution guidelines](https://github.com/FasterXML/jack
255
254
256
255
If you are going to write code, choose the appropriate base branch:
257
256
258
-
-`2.18` for bugfixes against the current stable version
259
-
-`2.19` for additive functionality & features or [minor](https://semver.org), backwards compatible changes to existing behavior to be included in the next minor version release
257
+
-`2.19` for bugfixes against the current stable version
258
+
-`2.x` for additive functionality & features or [minor](https://semver.org), backwards compatible changes to existing behavior to be included in the next minor version release
260
259
-`3.x` for significant changes to existing behavior, which will be part of Jackson 3.0
0 commit comments