Fredrik Larsen
05/19/2021, 11:08 AMdata class Resource(
val fooInterval: Milliseconds,
val barInterval: Milliseconds?,
…
)
@JvmInline
value class Milliseconds(val units: Int)
The generated json for fooInterval
becomes
"fooInterval-kqdxTu8": 900,
And for the nullable property it becomes
"barInterval-OO-hnm0": {
"units": 900
}
The suffix comes from the generated type (value class) but It looks like a bug that it is used as part of the parameter name.
Any thoughts?Fredrik Larsen
05/19/2021, 11:36 AMcom.fasterxml.jackson.module:jackson-module-kotlin:2.12.3
Fredrik Larsen
05/19/2021, 11:48 AMFredrik Larsen
05/19/2021, 1:02 PM@JvmInline
value class Milliseconds @JsonCreator constructor(@JsonValue val units: Int)
dinomite
05/19/2021, 2:21 PM@JsonCreator
and @JsonValue
?