https://kotlinlang.org logo
#jackson-kotlin
Title
# jackson-kotlin
w

wakingrufus

09/17/2018, 8:41 PM
Does anyone have an example of creating a static
@JsonCreator
in kotlin? I tried it as an extension function, an jackson doesn't see it. This is the delegate/Map variant of a JsonCreator
d

diesieben07

09/19/2018, 7:58 AM
For jackson to be able to see it, it must be a static method inside the class from a java perspective. To achieve that in Kotlin, put the method in the class' companion object and mark it with
@JvmStatic
.
w

wakingrufus

09/19/2018, 4:48 PM
I will try this, thanks!
12 Views