You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I found an error in the read method of the ObjectTypeAdapter when the value is a Number, as it always transforms it to a double value. But maybe the expected value is an Integer. I made the following change, and it seems to work fine:
switch (token) {
case NUMBER:
String value = in.nextString();
if (value.contains(",") || value.contains(".")) {
return new BigDecimal(value); // or Double.valueOf(value);
} else {
return Integer.valueOf(value);
}
case....:
}