com.github.stormbit.vksdk.objects.models.MessagePayload.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vk-bot-sdk-kotlin Show documentation
Show all versions of vk-bot-sdk-kotlin Show documentation
The Kotlin library for working with VK api
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