-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON value could not be converted to Telegram.Bot.Types.Enums.ChatType #865
Comments
Are you using |
No, i am not using System.Text.Json |
Could you add more context? Is it a webhook on ASP.NET Core 3.1 or long polling mode? If it is webhook could you provide the code from startup and where you're deserializing webhook request? |
So this is a webhook on ASP.NET Core 3.1 Startup : public class Startup
GetBotClientAsync :
And for deserializing i'm using frombody attribute
|
Ok, so you do use services.AddControllers().AddNewtonsoftJson(); |
Thanks for help, everything is working, and maybe you write somewhere that for ASP.NET Core 3.0+ developers should use
|
Thank you I had the same problem and it worked! |
I found a bug to report
When i am trying to deserealize data from body json can't convert ChatType
Steps to reproduce:
1.Sending command 'start'
2.Waiting while json will be deserealized
3.Then happend 'bad request'
NuGet Package Version: 15.2.0
.NET Version: Core 3.1
IDE: Rider
App: Desktop
The text was updated successfully, but these errors were encountered: