[Dojo-interest] Numbers - trailing zero truncation

Kenneth G. Franqueiro kgf at dojotoolkit.org
Fri Apr 5 14:41:47 EDT 2013


Even if you were using dojo/request (which uses dojo/json, which uses
JSON.parse if it's available rather than eval), you would still find
that the .0 is "lost", because what you seem to be referring to is more
a matter of putting the number in a particular string format after the
data is received.  You might find something in dojo/number helpful for this.

http://dojotoolkit.org/reference-guide/1.8/dojo/number.html

--Ken

On 4/5/2013 2:39 PM, Tren wrote:
> After some more looking, I see that that dojo runs the xhr response json
> through eval() in dojo.fromJson() (dojo/_base/json.js).  eval() is the
> culprit.
> 
> 
> 
> --
> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Numbers-trailing-zero-truncation-tp3995606p3995609.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
> ________________________________________________________
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
> 
> Dojo-interest at mail.dojotoolkit.org
> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


More information about the Dojo-interest mailing list