-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Today my application started showing error 410 message in the search operation. I did a little debugging and find it would be something new requirement of the foursquare api related to parameter "V" . So resolve to upgrade SharpSquare to the latest version that is here in github, however I am having the error below:
Msg:
Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'FourSquare.SharpSquare.Entities.FourSquareEntityItems`1[FourSquare.SharpSquare.Entities.Venue]' 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 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 'response.neighborhoods', line 1, position 50.
Here:
public List SearchVenues(Dictionary<string, string> parameters)
{
FourSquareEntityItems venues = GetSingle<FourSquareEntityItems>("/venues/search", parameters, true).response["groups"];
return venues.items;
}