Fixed that super.typeFromId() didn't resolve Lists and Sets (but still don't know why Jackson writes their classes as id to output)
This commit is contained in:
parent
a4a70bbd32
commit
07446568ed
|
@ -24,11 +24,11 @@ open class JacksonClassNameIdResolver : ClassNameIdResolver(SimpleType.construct
|
|||
return super.idFromValue(value)
|
||||
}
|
||||
|
||||
override fun typeFromId(context: DatabindContext?, id: String?): JavaType {
|
||||
override fun typeFromId(context: DatabindContext, id: String): JavaType {
|
||||
return when (id) {
|
||||
RetrieveAccountTransactionsInMt940Parameters::class.jvmName -> _typeFactory.constructSpecializedType(_baseType, RetrieveAccountTransactionsInMt940Parameters::class.java)
|
||||
SepaAccountInfoParameters::class.jvmName -> _typeFactory.constructSpecializedType(_baseType, SepaAccountInfoParameters::class.java)
|
||||
else -> super.typeFromId(context, id)
|
||||
else -> _typeFactory.constructFromCanonical(id) // don't know why classes of Lists and Sets also get written as id to output, but for deserialization call to type factory is needed, super.typeFromId() does not work
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue