Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

System.Runtime.Serialization.SerializationException #6

Closed
appfinity opened this issue Apr 24, 2015 · 4 comments
Closed

System.Runtime.Serialization.SerializationException #6

appfinity opened this issue Apr 24, 2015 · 4 comments

Comments

@appfinity
Copy link

There seems to be a problem retrieving weather data for international locations using this library. When I use this code:
var fc = new ForecastIOPortable.ForecastApi(<API key>);
Forecast ForecastData = await fc.GetWeatherDataAsync(latitude, longitude,units,ForecastIOPortable.Language.English);

That code works perfectly fine for US, UK, etc locations, but when I try a place like Mumbai, India, I get the exception mentioned above.

Exception Details:
There was an error deserializing the object of type ForecastIOPortable.Models.Forecast. Input string was not in a correct format.

Note that this is just came up in the 1.5 release of my extremely popular WP weather app Atmosphere. Can you please look into this issue ASAP before I lose more international users?

@jcheng31
Copy link
Owner

Sure - I've found one problem so far (the time zone offset should be a double, not an int); going to test it a little more (with the various different units) before pushing an update to NuGet (hopefully later today).

Are there any other cities which you've found cause it to break?

@appfinity
Copy link
Author

Any city in India seems to be broken, and probably a few in Europe. The issue, now what you explain it is an int, not a double, makes so much sense. India has a timezone offset of 5.5 (a decimal) and an Int does not support decimals. That should be causing the entire problem.

jcheng31 added a commit that referenced this issue Apr 24, 2015
@jcheng31
Copy link
Owner

Alright, I've pushed it to NuGet as version 2.1.2 - let me know if there're any other issues :)

@appfinity
Copy link
Author

Alright, trying it out now. Thank you for the prompt response.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants