-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Hello,
I am new arround here and i tried using SharpSquare. I tried to build a simple app by i am getting this result. ( at the end of the post )
Can you guys help me out ?
Do i need token or something ? How do i do that ?
SharpSquare sharpSquare = new SharpSquare("Client id", "Client secret");
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("ll", "51.508515,-0.1254872");
parameters.Add("categoryId", "4d4b7105d754a06374d81259"); //Food
parameters.Add("radius", "5000");
parameters.Add("limit", "50");
var result = sharpSquare.SearchVenues(parameters);
result.Wait();
ERROR 👍
-
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.
Thrown: "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.
Path 'response.venues', line 1, position 43." (Newtonsoft.Json.JsonSerializationException) Exception Message = "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.\r\nTo 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.\r\nPath 'response.venues', line 1, position 43.", Exception Type = "Newtonsoft.Json.JsonSerializationException", Exception WinRT Data = null
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels