Reputation: 1784
Hi I'm making a web api client that returns stuff in json. I'm using Restsharp that uses newtonsoft.json to deserialize json objects.
The problem is that the server returns an object with a property with #Text as name. Is there a way to make restsharp parse this?
Here is a sample:
image: [
{
#text: http://userserve-ak.last.fm/serve/34s/55125087.png
size: small
}]
All the other properties are being parsed just right the only problem is this one, the property is a string type so no problem in here.
Regards
Upvotes: 1
Views: 300
Reputation: 772
That JSON isn't valid; you need to put quotes around the #text key (so make it "#text") as well as both values (so "http://...png" and "small").
Upvotes: 1