baalexander/node-xmlrpc — pull request #63 by patricklodder (2012-11-23 01:43:32+00:00)
Title: Forcedfloat

I ran into problems talking to a java rpc server when expecting double's but JS 'number' primitive is serialized as an int.

Scenario 1, correct serialization:
```javascript
require('./lib/serializer').serializeMethodCall('foo', [parseFloat("0.5")]);
```
```xml

foo

0.5

```

Scenario 2, wrong serialization:
```javascript
require('./lib/serializer').serializeMethodCall('foo', [parseFloat("0.5") + parseFloat("0.5")]);
```
```xml

foo

1

```

The neatest thing I could come up with is a Float class that forces number parsing as a double, but it's 5:40am so maybe there's a better solution.

```javascript
require('./lib/serializer').serializeMethodCall('foo', [new xmlrpc.Float(parseFloat("0.5") + parseFloat("0.5"))]);
```
```xml

foo

1

```