I have a simple test app that pulls an xml doc from a rest interface. The data element has a couple of string fields and a couple of boolean fields. I creates a simple entity class and put a DataContractAttribute on it and then added DataMemberAttributes to each data member. I then use HttpResponseMessage.Content.ReadAsDataContract() to parse the response. All the string types come through just fine but all of my boolean types are false (and they are not really false). The xml element is something like:
<is-enabled type="boolean">true</is-enabled>
and then in my type class I have something like:
[DataMember(Name="is-enabled")]
public bool isEnabled
{
get
{
return this.isEnabledField;
}
set
{
this.isEnabledField = value;
}
}
How do I get the boolean values to come through properly?