Skip to content

Commit cd0740a

Browse files
authored
Merge pull request #975 from k163377/fix/readme
Fix README
2 parents ff6feb0 + 55df48f commit cd0740a

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

README.md

+14-15
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and those with secondary constructors or static factories are also supported.
1313

1414
# Status
1515

16-
* release `2.19.0` (for Jackson `2.19.0`) [![GitHub Actions build](https://github.com/FasterXML/jackson-module-kotlin/actions/workflows/main.yml/badge.svg?branch=2.19)](https://github.com/FasterXML/jackson-module-kotlin/actions?query=branch%3A2.19)
16+
* release `2.19.0` (for Jackson `2.19.x`) [![GitHub Actions build](https://github.com/FasterXML/jackson-module-kotlin/actions/workflows/main.yml/badge.svg?branch=2.19)](https://github.com/FasterXML/jackson-module-kotlin/actions?query=branch%3A2.19)
1717
* release `2.18.3` (for Jackson `2.18.x`) [![GitHub Actions build](https://github.com/FasterXML/jackson-module-kotlin/actions/workflows/main.yml/badge.svg?branch=2.18)](https://github.com/FasterXML/jackson-module-kotlin/actions?query=branch%3A2.18)
1818
* release `2.17.3` (for Jackson `2.17.x`) [![GitHub Actions build](https://github.com/FasterXML/jackson-module-kotlin/actions/workflows/main.yml/badge.svg?branch=2.17)](https://github.com/FasterXML/jackson-module-kotlin/actions?query=branch%3A2.17)
1919

@@ -130,12 +130,12 @@ Any fields not present in the constructor will be set after the constructor call
130130
An example of these concepts:
131131

132132
```kotlin
133-
@JsonInclude(JsonInclude.Include.NON_EMPTY)
134-
class StateObjectWithPartialFieldsInConstructor(val name: String, @JsonProperty("age") val years: Int) {
135-
@JsonProperty("address") lateinit var 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-
}
133+
@JsonInclude(JsonInclude.Include.NON_EMPTY)
134+
class StateObjectWithPartialFieldsInConstructor(val name: String, @JsonProperty("age") val years: Int) {
135+
@JsonProperty("address") lateinit var 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+
}
139139
```
140140

141141
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
173173
A `com.fasterxml.jackson.annotation.@JsonTypeInfo` annotation at the base-class is still necessary.
174174

175175
```kotlin
176-
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME)
177-
sealed class SuperClass{
178-
class A: SuperClass()
179-
class B: SuperClass()
180-
}
176+
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME)
177+
sealed class SuperClass{
178+
class A: SuperClass()
179+
class B: SuperClass()
180+
}
181181

182182
...
183183
val mapper = jacksonObjectMapper()
@@ -188,7 +188,6 @@ when(root){
188188
}
189189
```
190190

191-
192191
# Configuration
193192

194193
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
255254

256255
If you are going to write code, choose the appropriate base branch:
257256

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
260259
- `3.x` for significant changes to existing behavior, which will be part of Jackson 3.0
261260

262261
### Failing tests

0 commit comments

Comments
 (0)