Invalid response for current weather api call:

  • 1
  • Problem
  • Updated 2 years ago
Invalid response for current weather api call: Error: Parse error on line 3: ... "version": "0.1" "termsofService": "h ----------------------^ Expecting 'EOF', '}', ':', ',', ']', got 'STRING'


Response from api call:
{
"response": {
"version": "0.1"
"termsofService": "http://www.wunderground.com/weather/api/d/terms.html"
"features": {
"conditions": 1
}
-

}
-

"current_observation": {
"image": {
"url": "http://icons.wxug.com/graphics/wu2/logo_130x80.png"
"title": "Weather Underground"
"link": "http://www.wunderground.com"
}
-

"display_location": {
"full": "Gurgaon, India"
"city": "Gurgaon"
"state": ""
"state_name": "India"
"country": "IN"
"country_iso3166": "IN"
"zip": "00000"
"magic": "1"
"wmo": "42178"
"latitude": "28.42000008"
"longitude": "77.00000000"
"elevation": "5.00000000"
}
-

"observation_location": {
"full": "New Delhi, "
"city": "New Delhi"
"state": ""
"country": "IN"
"country_iso3166": "IN"
"latitude": "28.56666756"
"longitude": "77.11666870"
"elevation": "764 ft"
}
-

"estimated": {
}

"station_id": "VIDP"
"observation_time": "Last Updated on April 26, 4:00 PM IST"
"observation_time_rfc822": "Tue, 26 Apr 2016 16:00:00 +0530"
"observation_epoch": "1461666600"
"local_time_rfc822": "Tue, 26 Apr 2016 16:12:39 +0530"
"local_epoch": "1461667359"
"local_tz_short": "IST"
"local_tz_long": "Asia/Kolkata"
"local_tz_offset": "+0530"
"weather": "Haze"
"temperature_string": "106 F (41 C)"
"temp_f": 106
"temp_c": 41
"relative_humidity": "6%"
"wind_string": "From the NNE at 8 MPH"
"wind_dir": "NNE"
"wind_degrees": 20
"wind_mph": 8
"wind_gust_mph": 0
"wind_kph": 13
"wind_gust_kph": 0
"pressure_mb": "1007"
"pressure_in": "29.74"
"pressure_trend": "0"
"dewpoint_string": "27 F (-3 C)"
"dewpoint_f": 27
"dewpoint_c": -3
"heat_index_string": "NA"
"heat_index_f": "NA"
"heat_index_c": "NA"
"windchill_string": "NA"
"windchill_f": "NA"
"windchill_c": "NA"
"feelslike_string": "106 F (41 C)"
"feelslike_f": "106"
"feelslike_c": "41"
"visibility_mi": "3.1"
"visibility_km": "5.0"
"solarradiation": "--"
"UV": "5"
"precip_1hr_string": "-9999.00 in (-9999.00 mm)"
"precip_1hr_in": "-9999.00"
"precip_1hr_metric": "--"
"precip_today_string": "0.00 in (0.0 mm)"
"precip_today_in": "0.00"
"precip_today_metric": "0.0"
"icon": "hazy"
"icon_url": "http://icons.wxug.com/i/c/k/hazy.gif"
"forecast_url": "http://www.wunderground.com/global/stations/42178.html"
"history_url": "http://www.wunderground.com/history/airport/VIDP/2016/4/26/DailyHistory.html"
"ob_url": "http://www.wunderground.com/cgi-bin/findweather/getForecast?query=28.56666756,77.11666870"
"nowcast": ""
}
-

}


IT WAS WORKING BEFORE BUT , SENDING INVALID RESPONSE FROM YESTERDAY
Photo of Tajamul Fazili

Tajamul Fazili

  • 1 Post
  • 0 Reply Likes

Posted 2 years ago

  • 1
Photo of Ravi Yadav

Ravi Yadav

  • 82 Posts
  • 8 Reply Likes
Tajamul, 

Can you share the url you are constructing to make the API call?