Tommi Reiman
01/28/2020, 8:50 PMTommi Reiman
01/28/2020, 8:51 PMCzar
01/28/2020, 9:30 PMfun <T : Any> T.merge(other: T): T {
val nameToProperty = this::class.declaredMemberProperties.associateBy { it.name }
//...
Czar
01/28/2020, 10:37 PMTommi Reiman
01/29/2020, 2:51 PMCzar
01/29/2020, 4:34 PMreturn rightValue?.let { leftValue?.merge(it) } ?: rightValue ?: leftValue
Tommi Reiman
02/03/2020, 4:07 PMTommi Reiman
02/03/2020, 4:08 PMerasedType()
, but coudn’t figure out how to use that here. Anyway, here’s the code for it: https://github.com/FasterXML/jackson-module-kotlin/blob/master/src/main/kotlin/com/fasterxml/jackson/module/kotlin/Types.ktTommi Reiman
02/03/2020, 4:08 PMCzar
02/03/2020, 4:39 PMTommi Reiman
02/03/2020, 4:45 PM