commonMain.com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of TelegramBotAPI-jvm Show documentation
Show all versions of TelegramBotAPI-jvm Show documentation
Library for Object-Oriented and type-safe work with Telegram Bot API
package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.utils.toJsonWithoutNulls
import kotlinx.serialization.SerializationStrategy
import kotlinx.serialization.json.JsonObject
interface SimpleRequest : Request {
val requestSerializer: SerializationStrategy<*>
}
@Suppress("UNCHECKED_CAST")
inline fun > K.json(): JsonObject = toJsonWithoutNulls(requestSerializer as SerializationStrategy)