I have the following model class:
[DataContract(Namespace = "http://api.mycompany.com/v1")]
public class Job{
[DataMember(IsRequired = true), Required]
public long Id { get; set; }
[DataMember(EmitDefaultValue = false)]
public DateTime? StartDate { get; set; }
[DataMember(EmitDefaultValue = false)]
public DateTime? EndDate { get; set; }
[DataMember(EmitDefaultValue = false)]
public bool isCurrentJob { get; set; }
}
For some reason when I do an HTTP GET request, the boolean isCurrentJob field does not get included in the serialized response back to the client. Is there any reason this might be happening? The value is not null, it's set to true.
If I change this field to a string, it appears no problem in the response. All of the other fields appear in the response.