Assume you have these classes:
public class Base
{
}
public class Derived : Base
{
}
The RestSharp.Deserializers.DotNetXmlDeserializer
(which uses System.Xml.Serialization.XmlSerializer
) fails when trying to deserialize the following to Base
:
<?xml version="1.0" encoding="utf-8"?>
<Derived />
This deserializer checks the root element's name to determine the type to deserialize to using reflection.