From dfdc7fd5c2079d24347104cdc53ee66f95ca10d0 Mon Sep 17 00:00:00 2001 From: dankito Date: Fri, 23 Oct 2020 03:06:50 +0200 Subject: [PATCH] Temporarily commented out TypeResolvers as they break BankingPersisterJson --- .../net/dankito/banking/util/JacksonJsonSerializer.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/JacksonJsonSerializer.kt b/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/JacksonJsonSerializer.kt index 751fd2ca..93eb2c8e 100644 --- a/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/JacksonJsonSerializer.kt +++ b/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/JacksonJsonSerializer.kt @@ -9,11 +9,12 @@ import kotlin.reflect.KClass open class JacksonJsonSerializer( protected val serializer: net.dankito.utils.serialization.ISerializer = net.dankito.utils.serialization.JacksonJsonSerializer { objectMapper -> - val typeResolver = ObjectMapper.DefaultTypeResolverBuilder(ObjectMapper.DefaultTyping.OBJECT_AND_NON_CONCRETE) - typeResolver.init(JsonTypeInfo.Id.CLASS, JacksonClassNameIdResolver()) - typeResolver.inclusion(JsonTypeInfo.As.PROPERTY) - typeResolver.typeProperty("@CLASS") - objectMapper.setDefaultTyping(typeResolver) + // TODO: re-enable this to solve issue that in fints4kBankingClient only parent classes are serialized. But also take care off that BankingPersisterJson still works afterwards +// val typeResolver = ObjectMapper.DefaultTypeResolverBuilder(ObjectMapper.DefaultTyping.OBJECT_AND_NON_CONCRETE) +// typeResolver.init(JsonTypeInfo.Id.CLASS, JacksonClassNameIdResolver()) +// typeResolver.inclusion(JsonTypeInfo.As.PROPERTY) +// typeResolver.typeProperty("@CLASS") +// objectMapper.setDefaultTyping(typeResolver) } ) : ISerializer {