Hi, i'm running Tweetinvi 0.9..4.1, it was working great then suddenly i'm receiving an exception whenever call loggedUser.GetAccountSettingsAsync()
Exception details:
An exception of type 'Newtonsoft.Json.JsonSerializationException' occurred in Newtonsoft.Json.DLL but was not handled in user code
Additional information: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Tweetinvi.Logic.Model.TrendLocation' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path 'trend_location', line 1, position 401.
Follows JSON before serialization:
{"time_zone":{"name":"Cairo","utc_offset":7200,"tzinfo_name":"Africa\/Cairo"},"protected":false,"screen_name":"waleed_timimi","always_use_https":true,"use_cookie_personalization":true,"sleep_time":{"enabled":false,"end_time":null,"start_time":null},"geo_enabled":false,"language":"en","discoverable_by_email":true,"discoverable_by_mobile_phone":false,"display_sensitive_media":false,"trend_location":[{"name":"Cairo","countryCode":"EG","url":"http:\/\/where.yahooapis.com\/v1\/place\/1521894","woeid":1521894,"placeType":{"name":"Town","code":7},"parentid":23424802,"country":"Egypt"}]}
Comments: ** Comment from web user: linvi **
Exception details:
An exception of type 'Newtonsoft.Json.JsonSerializationException' occurred in Newtonsoft.Json.DLL but was not handled in user code
Additional information: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Tweetinvi.Logic.Model.TrendLocation' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path 'trend_location', line 1, position 401.
Follows JSON before serialization:
{"time_zone":{"name":"Cairo","utc_offset":7200,"tzinfo_name":"Africa\/Cairo"},"protected":false,"screen_name":"waleed_timimi","always_use_https":true,"use_cookie_personalization":true,"sleep_time":{"enabled":false,"end_time":null,"start_time":null},"geo_enabled":false,"language":"en","discoverable_by_email":true,"discoverable_by_mobile_phone":false,"display_sensitive_media":false,"trend_location":[{"name":"Cairo","countryCode":"EG","url":"http:\/\/where.yahooapis.com\/v1\/place\/1521894","woeid":1521894,"placeType":{"name":"Town","code":7},"parentid":23424802,"country":"Egypt"}]}
Comments: ** Comment from web user: linvi **
I have been able to replicate the issue. The Twitter Team have decided it would be fun to change the json properties name. This resulted in the parser not being able to match correctly the AccountSettings associated with TrendLocation.
I will issue a fix during the day. This will be available through the Source Code and in next release.
Linvi