-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
JsonParser from MismatchedInputException cannot getText() for floating-point value #2770
Comments
One quick question: have you observed this with other types? I guess I can test with |
I have, I can update it tomorrow when I'm back to work. |
Fixed for 2.11.1. |
Sorry for the late reply. Looks like it is only float for booleans.
|
Thanks, makes sense. Code refactoring for 2.12 had actually resolved that for 2.12 branch, but I fixed it for 2.11. |
I've stumbled upon another situation in which I'm not able to get the textual representation of the current token.
I have the following class:
And the following object mapper:
I'm trying to deserialize something that would result in a
MismatchedInputException
: I'm providing a number to something that expects a boolean:This results in:
while I would expect
parser.getText()
to return"1.0"
.Related with #2635. However that one was specifically for
InputStream
s, where here it happens for bothString
s andInputStream
s.(Jackson 2.11.0)
The text was updated successfully, but these errors were encountered: