filoquin / json-xml-rpc

Automatically exported from code.google.com/p/json-xml-rpc
0 stars 0 forks source link

Number to XML conversion #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In javascript xmlrpc client
2. Send xmlrpc request with params = [-0.2]

What is the expected output? What do you see instead?
Expect to see XML output containing <double>-0.2</double>
Instead exception occurs trying to write <int>-0.2</int>

What version of the product are you using? On what operating system?
Javascript client 0.8.0.2, XMLRPC protocol

Please provide any additional information below.
This can be fixed by changing line 669 from:
   else if(parseInt(value) == Math.ceil(value)){
to:
   else if(Math.floor(value) == Math.ceil(value)){

Original issue reported on code.google.com by matthewp...@gmail.com on 20 Apr 2011 at 3:55