Faced the following problem:
Multiple sealed subclasses of 'class com.elbekd.bot.types.InlineQueryResult' have the same serial name 'photo': 'class com.elbekd.bot.types.InlineQueryResultPhoto', 'class com.elbekd.bot.types.InlineQueryResultCachedPhoto'
Moreover, these InlineQueryResult classes don't need deserialize methods and don't need type field in serialization (by default, kotlinx.serialization uses it for deserialization and here it was an error: there is a collision - type field is used for type serialization, type field is needed by Telegram API) \
The solution is getting rid of type by boilerplating serialization delegation and moving field type from InlineQueryResult's constructor argument to body due to Impossible to make this class serializable because its parent is not serializable and does not have exactly one constructor without parameters
Faced the following problem:
Multiple sealed subclasses of 'class com.elbekd.bot.types.InlineQueryResult' have the same serial name 'photo': 'class com.elbekd.bot.types.InlineQueryResultPhoto', 'class com.elbekd.bot.types.InlineQueryResultCachedPhoto'
Moreover, theseInlineQueryResult
classes don't needdeserialize
methods and don't needtype
field in serialization (by default,kotlinx.serialization
uses it for deserialization and here it was an error: there is a collision -type
field is used for type serialization,type
field is needed by Telegram API) \ The solution is getting rid oftype
by boilerplating serialization delegation and moving fieldtype
fromInlineQueryResult
's constructor argument to body due toImpossible to make this class serializable because its parent is not serializable and does not have exactly one constructor without parameters
Update version to
2.1.6