All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.com.huanshankeji.kotlinx.serialization.SerializersJVM.kt Maven / Gradle / Ivy

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