code-crusher / EasyWeather

:sunny: Easy and quick weather fetching from OpenWeatherMap API for Android.
73 stars 18 forks source link

json parse error #2

Open croccio opened 7 years ago

croccio commented 7 years ago

java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 377 path $.rain

"rain" should be an object, not a string

code-crusher commented 7 years ago

Hey @croccio let me check the Api again and get back to you. Will try to fix it asap. Thanks :)

croccio commented 7 years ago

here the response

{"coord":{"lon":12.49,"lat":41.9},"weather":[{"id":502,"main":"Rain","description":"heavy intensity rain","icon":"10d"},{"id":202,"main":"Thunderstorm","description":"thunderstorm with heavy rain","icon":"11d"}],"base":"stations","main":{"temp":292.62,"pressure":1019,"humidity":94,"temp_min":290.93,"temp_max":294.15},"visibility":2500,"wind":{"speed":6.2,"deg":160},"rain":{"1h":9.18},"clouds":{"all":90},"dt":1474014483,"sys":{"type":1,"id":5848,"message":0.0286,"country":"IT","sunrise":1474001510,"sunset":1474046203},"id":6545158,"name":"Trevi","cod":20

code-crusher commented 7 years ago

Ah, they have changed the Api. Let me check all the Api's again. Will change the parsing object. Thank you @croccio for this. 😄