The JSONObject interface has the method getDouble():Double. The type Double is however not present in WebDSL and conversion to Float does not exist.

We should probably provide our own wrapper for JSONObject which declares getFloat():Float.

Submitted by Vlad Vergu on 13 May 2012 at 17:14

On 18 February 2013 at 23:29 Oscar Castañeda commented:

An idea for a workaround is to declare Entity attributes as Float and use JSONObject method getString():String followed by parseFloat(), eg:


json.getString(“reallyFloat”).parseFloat();

Log in to post comments