FlatFile icon indicating copy to clipboard operation
FlatFile copied to clipboard

Null Value not Working for Delimited Attribute Map

Open ellio246t opened this issue 8 years ago • 1 comments

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 avatar Jun 19 '17 14:06 ellio246t

@ellio246t I will investigate and fix it in #55

forcewake avatar Sep 22 '17 15:09 forcewake