restsharp/RestSharp — pull request #203 by PaulCampbell (2012-01-17 15:44:56+00:00)
Title: Deserializing XML  missing node (nullable property) problem

Given the following object:

public class PersonForXml
{
public string Name { get; set; }
public Friend BestFriend { get; set; }
}

When deserializing the following xml:

The Fonz

results in

person.Name == "The Fonz"

(It should be null or empty string)

This fixes it...

*HOWEVER*
It may break other users who have used the deserializer to deserialize to an object from an XML element which is nested within the XML sent to the deserializer, where they haven't set the deserializer.RootElement property (As was the case with the Can_Deserialize_Lastfm_Xml test)!!!

In short, I believe this is a good bug fix, but may cause some folks problems if they have not made use of the Deserializer.RootElement as I think it should be used.