JoshClose / CsvHelper

Library to help reading and writing CSV files
http://joshclose.github.io/CsvHelper/
Other
4.65k stars 1.05k forks source link

add type hints to dynamic records #2183

Open mikeTWC1984 opened 10 months ago

mikeTWC1984 commented 10 months ago

This sample will do all columns as string https://joshclose.github.io/CsvHelper/examples/reading/get-dynamic-records/

Looking for a way to do the same but adding some type hints, that could be passed outside .net runtime. E.g. I'm working with csv generated using jdbc/sql query. I would know types at generating csv (in Java), and can pass them as first line of csv, or as an extra info on column name, e.g.:

"Id:Int32","Name:String","DoB:DateTime","Picture:Binary" "1234","John","1984-01-01","LTk3MTg3MjU0Mw=="