import org.json.simple.JSONObject;

/** Representation of the geoip information for a given IP address, created
    from a JSON representation of the information returned by the Pings server.
    Includes the longitude and latitude, and the city and country.
 */
public class GeoipInfo {

    final public String city;
    final public String country;

    final public double longitude;
    final public double latitude;

    /** Constructs a GeoipInfo object from JSON information returned by
        the Pings server. */
    public GeoipInfo(JSONObject json) {
        city = (String)json.get("city");
        country = (String)json.get("country_name");
        
        /*FIXME : jsonobject get cast into doubles which are cast into floats 
        and then cast back into double*/
        longitude = ((Double)json.get("longitude")).floatValue();
        latitude = ((Double)json.get("latitude")).floatValue();
    }
    
    /**
     * An alternative constructor for testing purpose
     */
    //TODO : remove it when useless
    public GeoipInfo(String city,String country,double longitude,double latitude) {
    	this.city = city;
    	this.country = country;
    	this.longitude = longitude;
    	this.latitude = latitude;
    }
}


@@ -663,128 +663,8 @@
    %0A
-        /*FIXME : jsonobject get cast into doubles which are cast into floats %0A        and then cast back into double*/%0A
     
@@ -673,38 +673,38 @@
   longitude = ((
-Double
+Number
 )json.get(%22longi
@@ -703,37 +703,38 @@
 t(%22longitude%22)).
-float
+double
 Value();%0A       
@@ -751,14 +751,14 @@
 = ((
-Double
+Number
 )jso
@@ -780,13 +780,14 @@
 %22)).
-float
+double
 Valu
@@ -863,16 +863,18 @@
  purpose
+s.
 %0A     */
@@ -878,44 +878,8 @@
  */%0A
-    //TODO : remove it when useless%0A
     
@@ -907,16 +907,17 @@
 ng city,
+ 
 String c
@@ -923,16 +923,38 @@
 country,
+%0A                     
 double l
@@ -962,16 +962,17 @@
 ngitude,
+ 
 double l

Fix conversion of parsed JSON numbers to double so they do not go through a float value in between; also use correct Java base class returned by Json-simple for boxed numbers.