orbednetwork / chrome-rest-client

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

The JSON view seems to be rounding up large numbers (unsigned 64 bit numbers) #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run a query against some web service that returns a JSON response that 
contains unsigned 64-bit numbers

What is the expected output? What do you see instead?
The expected output is 18014398509481984419
The actual output in the JSON view is 18014398509481984000
The output in the raw view is correct

What version of the product are you using? On what operating system?
I'm using version 2.0.5 on Windows Server 2008 R2 running Chrome 12.0.742.122

Please provide any additional information below.

Original issue reported on code.google.com by aakash.k...@gmail.com on 4 Aug 2011 at 1:13

GoogleCodeExporter commented 9 years ago
I think it's all about java integer value and GWT JSON parser. It is in 
com.restclient.client.widgets.parseNumericValue(JSONNumber number) 
(http://code.google.com/p/chrome-rest-client/source/browse/trunk/RestClientApp/s
rc/com/restclient/client/widgets/JSONViewer.java).
I'll check this in few days (quite busy right now :(

Original comment by jarro...@gmail.com on 4 Aug 2011 at 10:56

GoogleCodeExporter commented 9 years ago
I've found discussion about this 
http://stackoverflow.com/questions/1379934/large-numbers-erroneously-rounded-in-
javascript
It is not an application issue. According to ECMA spec this number overflowing  
capacity of JavaScript's number type. 
I can't correct this because rest client work as javascript application and 
numbers are parsed in JS.

Original comment by jarro...@gmail.com on 23 Aug 2011 at 7:36