djangid / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

.andReturn().path(path) return rouded values by default. Long values are rounded #360

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. 4.771975994110107 json value in path parser is returned as [4.771976]

What is the expected output? What do you see instead?
Long values shouldn't be rounded

What version of the product are you using? On what operating system?
last maven version

Please provide any additional information below.

json parsed:

{
   "results" : [
      {
         "elevation" : 1608.637939453125,
         "location" : {
            "lat" : 39.7391536,
            "lng" : -104.9847034
         },
         "resolution" : 4.771975994110107
      }
   ],
   "status" : "OK"
}

Original issue reported on code.google.com by tatajaja...@gmail.com on 8 Oct 2014 at 1:39

GoogleCodeExporter commented 8 years ago
This is because it's represented as a float. Please use BigDecimals if you need 
to be precise, see usage guide and search for BigDecimal. 

Original comment by johan.ha...@gmail.com on 14 Oct 2014 at 12:30