FlatFile
FlatFile copied to clipboard
Null Value not Working for Delimited Attribute Map
e.g. File with one row where Age is null FirstName,LastName,Age,Date of Birth John,Doh,,09/06/1947
Here's the map: [DelimitedFile(Delimiter = ",", Quotes = """, HasHeader = true)] public class PersonRecordWithAttributeMap { [DelimitedField(1)] public string FirstName { get; set; }
[DelimitedField(2)]
public string LastName { get; set; }
[DelimitedField(3,NullValue = "", Name = "Age")]
public int? Age { get; set; }
}
For the age column NullValue="" produces a parse error. I've also tried NullValue=null. Same behaviour. Only seems to work if the raw file uses a magic string to represent null.
@ellio246t I will investigate and fix it in #55