Hi there,
I am trying to parse a result from openweather.com, and unfortunately I need to find a way to handelt more than 10 numeric results (14 at least, to be precise).
Unfotunatly, JSONhandler throws an exception when trying to convince it to treat a returned numeric value as a string instead of a number… (my initial idea was to convert the string to a number later on)
What would be the easiest way to achieve the goal?
An example JSON output is:
{“lat”:53.587,“lon”:9.7634,“timezone”:“Europe/Berlin”,“timezone_offset”:7200,“current”:{“dt”:1712815812,“sunrise”:1712809759,“sunset”:1712859243,“temp”:10.87,“feels_like”:9.84,“pressure”:1026,“humidity”:70,“dew_point”:5.62,“uvi”:0.12,“clouds”:100,“visibility”:10000,“wind_speed”:6.17,“wind_deg”:210,“weather”:[{“id”:500,“main”:“Rain”,“description”:“Leichter Regen”,“icon”:“10d”}],“rain”:{“1h”:0.18}},“daily”:[{“dt”:1712833200,“sunrise”:1712809759,“sunset”:1712859243,“moonrise”:1712812500,“moonset”:0,“moon_phase”:0.1,“summary”:“Expect a day of partly cloudy with rain”,“temp”:{“day”:10.13,“min”:7.29,“max”:12.35,“night”:11.68,“eve”:12.12,“morn”:10.59},“feels_like”:{“day”:9.57,“night”:11.46,“eve”:11.84,“morn”:9.51},“pressure”:1028,“humidity”:91,“dew_point”:8.76,“wind_speed”:6.38,“wind_deg”:211,“wind_gust”:15.98,“weather”:[{“id”:501,“main”:“Rain”,“description”:“Mäßiger Regen”,“icon”:“10d”}],“clouds”:100,“pop”:1,“rain”:2.33,“uvi”:0.76},{“dt”:1712919600,“sunrise”:1712896018,“sunset”:1712945752,“moonrise”:1712900460,“moonset”:1712875680,“moon_phase”:0.14,“summary”:“There will be partly cloudy today”,“temp”:{“day”:14.39,“min”:9.95,“max”:16.41,“night”:9.95,“eve”:14.19,“morn”:11.42},“feels_like”:{“day”:14.16,“night”:8.83,“eve”:13.75,“morn”:11.12},“pressure”:1027,“humidity”:87,“dew_point”:12.19,“wind_speed”:6.33,“wind_deg”:234,“wind_gust”:11.86,“weather”:[{“id”:804,“main”:“Clouds”,“description”:“Bedeckt”,“icon”:“04d”}],“clouds”:100,“pop”:0,“uvi”:3.33},{“dt”:1713006000,“sunrise”:1712982278,“sunset”:1713032262,“moonrise”:1712989140,“moonset”:1712967120,“moon_phase”:0.17,“summary”:“Expect a day of partly cloudy with rain”,“temp”:{“day”:17.25,“min”:8.93,“max”:18.04,“night”:15.85,“eve”:16.44,“morn”:10.26},“feels_like”:{“day”:16.83,“night”:15.66,“eve”:16.23,“morn”:9.8},“pressure”:1023,“humidity”:69,“dew_point”:11.45,“wind_speed”:6.37,“wind_deg”:251,“wind_gust”:14.93,“weather”:[{“id”:500,“main”:“Rain”,“description”:“Leichter Regen”,“icon”:“10d”}],“clouds”:100,“pop”:0.2,“rain”:0.13,“uvi”:3.78},{“dt”:1713092400,“sunrise”:1713068539,“sunset”:1713118772,“moonrise”:1713078900,“moonset”:1713057480,“moon_phase”:0.21,“summary”:“Expect a day of partly cloudy with rain”,“temp”:{“day”:11.68,“min”:5.81,“max”:15.6,“night”:5.81,“eve”:7.76,“morn”:9.37},“feels_like”:{“day”:10.34,“night”:2.84,“eve”:4.42,“morn”:6.09},“pressure”:1018,“humidity”:55,“dew_point”:2.94,“wind_speed”:8.52,“wind_deg”:279,“wind_gust”:15.85,“weather”:[{“id”:500,“main”:“Rain”,“description”:“Leichter Regen”,“icon”:“10d”}],“clouds”:64,“pop”:0.42,“rain”:0.67,“uvi”:3.57},{“dt”:1713178800,“sunrise”:1713154800,“sunset”:1713205282,“moonrise”:1713169440,“moonset”:1713146580,“moon_phase”:0.25,“summary”:“The day will start with partly cloudy through the late morning hours, transitioning to rain”,“temp”:{“day”:10.44,“min”:3.92,“max”:10.44,“night”:3.92,“eve”:6.03,“morn”:6.36},“feels_like”:{“day”:9.29,“night”:-0.65,“eve”:2.5,“morn”:3.78},“pressure”:1005,“humidity”:67,“dew_point”:4.66,“wind_speed”:7.1,“wind_deg”:233,“wind_gust”:11.98,“weather”:[{“id”:501,“main”:“Rain”,“description”:“Mäßiger Regen”,“icon”:“10d”}],“clouds”:88,“pop”:1,“rain”:7.76,“uvi”:2.71},{“dt”:1713265200,“sunrise”:1713241062,“sunset”:1713291792,“moonrise”:1713260460,“moonset”:1713234720,“moon_phase”:0.27,“summary”:“You can expect rain in the morning, with partly cloudy in the afternoon”,“temp”:{“day”:8.3,“min”:2.77,“max”:8.69,“night”:4.52,“eve”:6.12,“morn”:4.94},“feels_like”:{“day”:4.71,“night”:1.78,“eve”:2.95,“morn”:0.34},“pressure”:1003,“humidity”:78,“dew_point”:4.81,“wind_speed”:7.6,“wind_deg”:275,“wind_gust”:14.34,“weather”:[{“id”:501,“main”:“Rain”,“description”:“Mäßiger Regen”,“icon”:“10d”}],“clouds”:99,“pop”:1,“rain”:16.93,“uvi”:3},{“dt”:1713351600,“sunrise”:1713327325,“sunset”:1713378302,“moonrise”:1713351600,“moonset”:1713322320,“moon_phase”:0.3,“summary”:“Expect a day of partly cloudy with rain”,“temp”:{“day”:8.32,“min”:2.02,“max”:8.32,“night”:2.02,“eve”:5.28,“morn”:4.86},“feels_like”:{“day”:4.64,“night”:-0.86,“eve”:1.56,“morn”:1.56},“pressure”:1013,“humidity”:69,“dew_point”:2.92,“wind_speed”:7.48,“wind_deg”:300,“wind_gust”:10.56,“weather”:[{“id”:500,“main”:“Rain”,“description”:“Leichter Regen”,“icon”:“10d”}],“clouds”:81,“pop”:1,“rain”:2.28,“uvi”:3},{“dt”:1713438000,“sunrise”:1713413588,“sunset”:1713464812,“moonrise”:1713442560,“moonset”:1713409500,“moon_phase”:0.33,“summary”:“Expect a day of partly cloudy with rain”,“temp”:{“day”:9.06,“min”:0.61,“max”:9.06,“night”:2.11,“eve”:5.53,“morn”:3.21},“feels_like”:{“day”:7.03,“night”:-0.23,“eve”:2.67,“morn”:1.85},“pressure”:1014,“humidity”:62,“dew_point”:2.18,“wind_speed”:4.69,“wind_deg”:322,“wind_gust”:8.31,“weather”:[{“id”:500,“main”:“Rain”,“description”:“Leichter Regen”,“icon”:“10d”}],“clouds”:74,“pop”:1,“rain”:2.73,“uvi”:3}]}
Specifically, text3 is failing (as would text 4,5, and 6)…
Regards