diff --git a/realtimedb/src/main/kotlin/de/sipgate/federmappe/realtimedb/DummyDataNormalizer.kt b/common/src/main/kotlin/de/sipgate/federmappe/common/decoder/DummyDataNormalizer.kt similarity index 55% rename from realtimedb/src/main/kotlin/de/sipgate/federmappe/realtimedb/DummyDataNormalizer.kt rename to common/src/main/kotlin/de/sipgate/federmappe/common/decoder/DummyDataNormalizer.kt index a147f38..539c57d 100644 --- a/realtimedb/src/main/kotlin/de/sipgate/federmappe/realtimedb/DummyDataNormalizer.kt +++ b/common/src/main/kotlin/de/sipgate/federmappe/common/decoder/DummyDataNormalizer.kt @@ -1,6 +1,4 @@ -package de.sipgate.federmappe.realtimedb - -import de.sipgate.federmappe.common.decoder.DataNormalizer +package de.sipgate.federmappe.common.decoder class DummyDataNormalizer : DataNormalizer { override fun normalize(data: Map): Map = data diff --git a/common/src/main/kotlin/de/sipgate/federmappe/common/decoder/StringMapToObjectDecoder.kt b/common/src/main/kotlin/de/sipgate/federmappe/common/decoder/StringMapToObjectDecoder.kt index 7fb4aa8..255a9d9 100644 --- a/common/src/main/kotlin/de/sipgate/federmappe/common/decoder/StringMapToObjectDecoder.kt +++ b/common/src/main/kotlin/de/sipgate/federmappe/common/decoder/StringMapToObjectDecoder.kt @@ -19,7 +19,7 @@ class StringMapToObjectDecoder( private val data: Map, override val serializersModule: SerializersModule = EmptySerializersModule(), private val ignoreUnknownProperties: Boolean = false, - private val dataNormalizer: DataNormalizer + private val dataNormalizer: DataNormalizer = DummyDataNormalizer() ) : AbstractDecoder(), TypeAwareDecoder { private val keysIterator = data.sortByPrio().keys.iterator() private var index: Int? = null diff --git a/realtimedb/src/main/kotlin/de/sipgate/federmappe/realtimedb/DataSnapshotExt.kt b/realtimedb/src/main/kotlin/de/sipgate/federmappe/realtimedb/DataSnapshotExt.kt index b61c98e..c7fd5f7 100644 --- a/realtimedb/src/main/kotlin/de/sipgate/federmappe/realtimedb/DataSnapshotExt.kt +++ b/realtimedb/src/main/kotlin/de/sipgate/federmappe/realtimedb/DataSnapshotExt.kt @@ -3,6 +3,7 @@ package de.sipgate.federmappe.realtimedb import com.google.firebase.database.DataSnapshot import de.sipgate.federmappe.common.ErrorHandler import de.sipgate.federmappe.common.decoder.DataNormalizer +import de.sipgate.federmappe.common.decoder.DummyDataNormalizer import de.sipgate.federmappe.common.toObjectWithSerializer import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.modules.EmptySerializersModule