commonMain.com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest.kt Maven / Gradle / Ivy
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)