I am using RestSharp to deserialize a XML file where some of the nodes are like this:
<element value="something" />
The elementes with an attribute called 'value' will not deserialize. Any ideas on how to get RestShap to deserialize this?
The object used to deserialize is like:
public class Object
{
public string Value { get; set; }
}
Please note, the XML is returned from a web service so I do not have the option of changing the attribute name to something different.
Okay, I have found a solution. I think this is somewhat an edge case.
I renamed the variable
public string Value {get;set;}
to
public string value {get;set;}
And now it deserializes perfectly. Guess the Uppercase Value is for the value contained in a XML element only.