Describe the bug
When an number is returned in a json response with no decimal, I'd expect it to be of type Integer, not type Double.
To Reproduce
Steps to reproduce the behavior:
I'm upgrading from the following:
testImplementation("com.konghq:unirest-java:2.3.11")
testImplementation("com.konghq:unirest-objectmapper-jackson:2.3.11")
To:
testImplementation("com.konghq:unirest-java:3.11.06")
testImplementation("com.konghq:unirest-objectmapper-jackson:3.11.06")
I have a json response that returns the following:
I'm getting the data like so: Unirest.get("localhost/getInteger").asJson().bodyobject.toMap()["integer"]
Expected behavior
In version 2 that comes over as a type of Integer, now it's coming back as a Double and failing my tests, as assertEquals(3, 3.0) is not true.
Environmental Data:
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
Additional context
I'm using this inside of a Kotlin application.
Describe the bug
When an number is returned in a json response with no decimal, I'd expect it to be of type Integer, not type Double.
To Reproduce
Steps to reproduce the behavior:
I'm upgrading from the following:
To:
I have a json response that returns the following:
{ "integer": 3 }I'm getting the data like so:
Unirest.get("localhost/getInteger").asJson().bodyobject.toMap()["integer"]Expected behavior
In version 2 that comes over as a type of
Integer, now it's coming back as aDoubleand failing my tests, asassertEquals(3, 3.0)is not true.Environmental Data:
Additional context
I'm using this inside of a Kotlin application.