I wouldn't know, without seeing the actual code and the table definition.

>>> testvalue = -0.20000000000000001
>>> import json
>>> json.dumps(round(testvalue, 2))
'-0.2'
>>> testvalue = 1410938640000
>>> json.dumps(testvalue)
'1410938640000'




On Friday, September 19, 2014 1:53:55 PM UTC+2, Ramos wrote:
>
> Hello i ´m stuck  with this problem, python related, not web2py but this 
> group is the place to get help right?
>
> I have a webservice to return around 20k records in a json format like
>
> [[1410938640000, -0.20000000000000001, "RI_12N01_VAL"], [1410938700000, 
> -0.20000000000000001, "RI_12N01_VAL"]]
>
> the float value is too big.
> In my code i have a round(value,2) to cut it to only 2 decimals but the 
> json array keeps coming with float like
>
> -0.20000000000000001
>
> what am i missing here ?
>
> Regards
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to