pengrad / java-telegram-bot-api

Telegram Bot API for Java

Home Page:https://core.telegram.org/bots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Throws NumberFormatException while converting JSON to Java object.

thesardorbroo opened this issue · comments

Library was working good but now it sometimes throws NumberFormatException. MessageId(Response) is greater than int, I can't find where I should fix.

java.io.IOException: com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 5836320026 at line 2 column 57 path $.result[0].message.from.id at com.pengrad.telegrambot.impl.TelegramBotClient$1.onResponse(TelegramBotClient.java:47) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)