1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

complete ImplicitReflectionSerializer removing

This commit is contained in:
InsanusMokrassar 2019-03-20 08:55:46 +08:00
parent eabb094ea5
commit e303a43d36
4 changed files with 1 additions and 8 deletions

View File

@ -41,6 +41,7 @@ for receivers.
### 0.12.3 Cleaning
* Refactor, optimizing and cleaning of code
* Removed deprecated method `T#toJsonWithoutNulls()`
## 0.11.0

View File

@ -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()
}

View File

@ -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
}

View File

@ -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(