mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-17 22:03:50 +00:00
commit
a729f9568c
@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.5.21
|
||||||
|
|
||||||
|
* `Versions`
|
||||||
|
* `Klock`: `2.3.1` -> `2.3.2`
|
||||||
|
* `Serialization`
|
||||||
|
* `Typed Serializer`:
|
||||||
|
* `TypedSerializer` Descriptor serial name has been fixed
|
||||||
|
|
||||||
## 0.5.20
|
## 0.5.20
|
||||||
|
|
||||||
* `Repos`:
|
* `Repos`:
|
||||||
|
@ -14,7 +14,7 @@ kotlin_exposed_version=0.33.1
|
|||||||
|
|
||||||
ktor_version=1.6.2
|
ktor_version=1.6.2
|
||||||
|
|
||||||
klockVersion=2.3.1
|
klockVersion=2.3.2
|
||||||
|
|
||||||
github_release_plugin_version=2.2.12
|
github_release_plugin_version=2.2.12
|
||||||
|
|
||||||
@ -45,5 +45,5 @@ dokka_version=1.5.0
|
|||||||
# Project data
|
# Project data
|
||||||
|
|
||||||
group=dev.inmo
|
group=dev.inmo
|
||||||
version=0.5.20
|
version=0.5.21
|
||||||
android_code_version=61
|
android_code_version=62
|
||||||
|
@ -8,11 +8,23 @@ import kotlin.reflect.KClass
|
|||||||
|
|
||||||
open class TypedSerializer<T : Any>(
|
open class TypedSerializer<T : Any>(
|
||||||
kClass: KClass<T>,
|
kClass: KClass<T>,
|
||||||
presetSerializers: Map<String, KSerializer<out T>> = emptyMap()
|
presetSerializers: Map<String, KSerializer<out T>> = emptyMap(),
|
||||||
) : KSerializer<T> {
|
) : KSerializer<T> {
|
||||||
protected val serializers = presetSerializers.toMutableMap()
|
protected val serializers = presetSerializers.toMutableMap()
|
||||||
@InternalSerializationApi
|
@InternalSerializationApi
|
||||||
open override val descriptor: SerialDescriptor = buildSerialDescriptor(
|
override val descriptor: SerialDescriptor = buildSerialDescriptor(
|
||||||
|
"TypedSerializer",
|
||||||
|
SerialKind.CONTEXTUAL
|
||||||
|
) {
|
||||||
|
element("type", String.serializer().descriptor)
|
||||||
|
element("value", ContextualSerializer(kClass).descriptor)
|
||||||
|
}
|
||||||
|
@InternalSerializationApi
|
||||||
|
@Deprecated(
|
||||||
|
"This descriptor was deprecated due to incorrect serial name. You may use it in case something require it, " +
|
||||||
|
"but it is strongly recommended to migrate onto new descriptor"
|
||||||
|
)
|
||||||
|
protected val oldDescriptor: SerialDescriptor = buildSerialDescriptor(
|
||||||
"TextSourceSerializer",
|
"TextSourceSerializer",
|
||||||
SerialKind.CONTEXTUAL
|
SerialKind.CONTEXTUAL
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user