mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
UpdateDeserializationStrategy currently is public
This commit is contained in:
parent
01da98d2fe
commit
0de1d9cfda
@ -51,6 +51,9 @@
|
|||||||
|
|
||||||
### 0.27.3
|
### 0.27.3
|
||||||
|
|
||||||
|
* `TelegramBotAPI`:
|
||||||
|
* Currently `UpdateDeserializationStrategy` is publicly available
|
||||||
|
|
||||||
### 0.27.2
|
### 0.27.2
|
||||||
|
|
||||||
* `Common`:
|
* `Common`:
|
||||||
|
@ -26,7 +26,14 @@ internal object UpdateSerializerWithoutSerialization : KSerializer<Update> {
|
|||||||
override fun serialize(encoder: Encoder, value: Update) = throw UnsupportedOperationException()
|
override fun serialize(encoder: Encoder, value: Update) = throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
|
|
||||||
internal object UpdateDeserializationStrategy : DeserializationStrategy<Update> {
|
/**
|
||||||
|
* Use this object to deserialize objects with type [Update]. Currently it is restricted to use this
|
||||||
|
* [DeserializationStrategy] only with JSON
|
||||||
|
*
|
||||||
|
* @see StringFormat.parse
|
||||||
|
* @see kotlinx.serialization.json.Json.parse
|
||||||
|
*/
|
||||||
|
object UpdateDeserializationStrategy : DeserializationStrategy<Update> {
|
||||||
override val descriptor: SerialDescriptor = JsonElementSerializer.descriptor
|
override val descriptor: SerialDescriptor = JsonElementSerializer.descriptor
|
||||||
|
|
||||||
override fun patch(decoder: Decoder, old: Update): Update = throw UpdateNotSupportedException("Update")
|
override fun patch(decoder: Decoder, old: Update): Update = throw UpdateNotSupportedException("Update")
|
||||||
|
Loading…
Reference in New Issue
Block a user