I have a PHP web service whill pulls data out of a MySQL database.
I have an Android app which calls the service.
Locally on my WAMP Server everything works fine but I just uploaded the data/service to a domain and testing against that.
I am getting this error:
org.json.JSONException: Value at Latitude of type java.lang.String cannot be converted to double
From this line of code:
double latitude = thisVenue.getDouble(TAG_LATITUDE);
And the value (taking from the log via Android Studio) which causes this error is:
"Latitude":"51.05279"
I cannot see why that value cannot be converted to a double. Locally my app can parse the same dataset no problem so I presume it has something to do with how it is stored/retrieved?
Edit: Here is one of the objects returned in JSON, notice all values have quotes
{"VenueID":"4","ListingID":"19","Name":"TempName1","Location":"207 10A St NW","DayOfWeek":"Mon","Featured":"0","FeaturedDistanceRange":"0","Latitude":"51.05279","Longitude":"-110.087509","StartHour":"4","StartHourType":"pm","StartMinute":"0","EndHour":"7","EndHourType":"pm","EndMinute":"0"}
And I format it as JSON like so:
header("Content-type: application/json");
print(json_encode(array('venues'=>$data)));