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

com.github.stormbit.vksdk.objects.models.MessagePayload.kt Maven / Gradle / Ivy

The newest version!
package com.github.stormbit.vksdk.objects.models

import kotlinx.serialization.*
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder

@Serializable
data class MessagePayload(val value: String) {

    @Serializer(forClass = MessagePayload::class)
    companion object : KSerializer {

        override fun serialize(encoder: Encoder, value: MessagePayload) = encoder.encodeString(value.value)

        override fun deserialize(decoder: Decoder): MessagePayload = MessagePayload(decoder.decodeString())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy