Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetUserFriends throw casting error #11

Open
elleryfamilia opened this issue Mar 17, 2014 · 1 comment
Open

GetUserFriends throw casting error #11

elleryfamilia opened this issue Mar 17, 2014 · 1 comment

Comments

@elleryfamilia
Copy link

In trying to retrieve my friend-list, I'm getting the Exception below. I tested several other methods successfully, so I know auth isn't an issue here.

'foursquare.GetUserFriends("334497")' threw an exception of type 'Newtonsoft.Json.JsonSerializationException'
base: {"Error converting value "21ac47b2cca3eba81920042c710541a5058336f8" to type 'FourSquare.SharpSquare.Entities.FourSquareEntityItems`1[FourSquare.SharpSquare.Entities.User]'. Path 'response.checksum', line 1, position 25143."}

@elleryfamilia
Copy link
Author

I found the cause... the issue is on line 119 of SharpSquare.cs, when JsonConvert tries to deserialize the JSON it just received from the server, it throws the error below:


Error converting value "21ac47b2cca3eba81920042c710541a5058336f8" to type 
'FourSquare.SharpSquare.Entities.FourSquareEntityItems`1[FourSquare.SharpSquare.Entities.User]'. 
Path 'response.checksum', line 1, position 25143.

This is happening because Foursquare is returning a "checksum" element which is not expected in the deserialization. When removed the checksum element from the JSON, the error above goes away. It's possible that this is a newly introduced item to the Foursquare API.

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

No branches or pull requests

1 participant