mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-21 08:07:16 +00:00
changelog upsert
This commit is contained in:
parent
b420d85be5
commit
39895e58a6
@ -6,6 +6,8 @@
|
|||||||
* Add functionality for multiplatform working with files:
|
* Add functionality for multiplatform working with files:
|
||||||
* Main class for files `MPPFile`
|
* Main class for files `MPPFile`
|
||||||
* Inline class for filenames work encapsulation `FileName`
|
* Inline class for filenames work encapsulation `FileName`
|
||||||
|
* `FSM`
|
||||||
|
* Module inited and in preview state
|
||||||
|
|
||||||
## 0.5.12
|
## 0.5.12
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ open class TypedSerializer<T : Any>(
|
|||||||
) : KSerializer<T> {
|
) : KSerializer<T> {
|
||||||
protected val serializers = presetSerializers.toMutableMap()
|
protected val serializers = presetSerializers.toMutableMap()
|
||||||
@InternalSerializationApi
|
@InternalSerializationApi
|
||||||
override open val descriptor: SerialDescriptor = buildSerialDescriptor(
|
open override val descriptor: SerialDescriptor = buildSerialDescriptor(
|
||||||
"TextSourceSerializer",
|
"TextSourceSerializer",
|
||||||
SerialKind.CONTEXTUAL
|
SerialKind.CONTEXTUAL
|
||||||
) {
|
) {
|
||||||
@ -21,7 +21,7 @@ open class TypedSerializer<T : Any>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@InternalSerializationApi
|
@InternalSerializationApi
|
||||||
override open fun deserialize(decoder: Decoder): T {
|
open override fun deserialize(decoder: Decoder): T {
|
||||||
return decoder.decodeStructure(descriptor) {
|
return decoder.decodeStructure(descriptor) {
|
||||||
var type: String? = null
|
var type: String? = null
|
||||||
lateinit var result: T
|
lateinit var result: T
|
||||||
@ -50,7 +50,7 @@ open class TypedSerializer<T : Any>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@InternalSerializationApi
|
@InternalSerializationApi
|
||||||
override open fun serialize(encoder: Encoder, value: T) {
|
open override fun serialize(encoder: Encoder, value: T) {
|
||||||
encoder.encodeStructure(descriptor) {
|
encoder.encodeStructure(descriptor) {
|
||||||
val valueSerializer = value::class.serializer()
|
val valueSerializer = value::class.serializer()
|
||||||
val type = serializers.keys.first { serializers[it] == valueSerializer }
|
val type = serializers.keys.first { serializers[it] == valueSerializer }
|
||||||
|
Loading…
Reference in New Issue
Block a user