jvmMain.com.huanshankeji.kotlinx.serialization.SerializersJVM.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-common-serialization-jvm Show documentation
Show all versions of kotlin-common-serialization-jvm Show documentation
Huanshankeji's common code libraries in Kotlin
The newest version!
package com.huanshankeji.kotlinx.serialization
import kotlinx.serialization.KSerializer
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.descriptors.buildClassSerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
@Deprecated("A workaround Nothing serializer doesn't work for the JS target.")
object VoidSerializer : KSerializer {
override val descriptor: SerialDescriptor
get() = buildClassSerialDescriptor("Nothing") {}
override fun deserialize(decoder: Decoder): Void =
throwIse()
override fun serialize(encoder: Encoder, value: Void) =
throwIse()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy