[Mono-list] Deserialising double values

Peter Hagen peter at willow-media.nl
Fri Oct 16 06:57:55 UTC 2015


Hi,

I was wondering if anyone knows about an issue with deserializing double, float and decimal values, with an MVC 4 site. The values are posted as JSON to the server. When running on Windows, it deserialises correctly. I assume its a culture issue, by which the current culture is used, instead of the invariant culture. The site is running on a manual build Mono 4.0.4.1 on Ubuntu 12.04. 

I set up a test page which posts the values to the action, which returns the same object again. Here below you can see the values that are posted, and received again:

Posted:

> dValue: 3.4563000202179
> dcValue: 12.3457
> fValue: 0.12345

Received:

> dValue: 34563000202179
> dcValue: 123457
> fValue: 12345

I was searching if there is a know bug, or a known working workaround for this. Does anyone have an idea?

Cheers

Peter


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20151016/fa2370fa/attachment.html>


More information about the Mono-list mailing list