mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
complete ImplicitReflectionSerializer removing
This commit is contained in:
parent
eabb094ea5
commit
e303a43d36
@ -41,6 +41,7 @@ for receivers.
|
||||
### 0.12.3 Cleaning
|
||||
|
||||
* Refactor, optimizing and cleaning of code
|
||||
* Removed deprecated method `T#toJsonWithoutNulls()`
|
||||
|
||||
## 0.11.0
|
||||
|
||||
|
@ -8,6 +8,5 @@ data class CommonMultipartFileRequest<T: Any>(
|
||||
val data: Request<T>,
|
||||
override val mediaMap: Map<String, MultipartFile>
|
||||
) : MultipartRequest<T>, Request<T> by data {
|
||||
@ImplicitReflectionSerializer
|
||||
override val paramsJson: JsonObject = data.json()
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ class MultipartRequestImpl<D: DataRequest<R>, F: Files, R: Any>(
|
||||
) : MultipartRequest<R> {
|
||||
override fun method(): String = data.method()
|
||||
override fun resultSerializer(): KSerializer<R> = data.resultSerializer()
|
||||
@ImplicitReflectionSerializer
|
||||
override val paramsJson: JsonObject = data.json()
|
||||
override val mediaMap: Map<String, MultipartFile> = files
|
||||
}
|
||||
|
@ -4,12 +4,6 @@ import kotlinx.serialization.ImplicitReflectionSerializer
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.json.*
|
||||
|
||||
@Deprecated("This method can throw exceptions")
|
||||
@ImplicitReflectionSerializer
|
||||
inline fun <reified T: Any> T.toJsonWithoutNulls(): JsonObject = Json.nonstrict.toJson(
|
||||
this
|
||||
).jsonObject.withoutNulls()
|
||||
|
||||
inline fun <reified T: Any> T.toJsonWithoutNulls(serializer: KSerializer<T>): JsonObject = toJson(serializer).withoutNulls()
|
||||
|
||||
inline fun <reified T: Any> T.toJson(serializer: KSerializer<T>): JsonObject = Json.nonstrict.toJson(
|
||||
|
Loading…
Reference in New Issue
Block a user