I am observing that the format or value of an item from a rest-assured response is changed when I try to retrieve the item using JsonPath.
Value of the field is 16637906.26 when I get the response.asString()
.
However when I retrieve this specific information using JsonPath, it returns the number as 1.6637906E7.
Below is the rest-assured JsonPath I used to get the data:
List<Map<String,?>> values = JsonPath.with(actResponse).param(param,value).get("entries.findAll { entries -> entries."+param+" == "+param+" }")
where param is a variable pointing to parameter I use.When I print this List, I can see that the value is then displayed as 1.6637906E7. All other smaller values are returned properly.
I tried to play with it a bit like converting the number etc, however nothing seem to work.
Highly appreciate if someone can guide me through this.