GitHub - kjpgit/SmallestCSVParser: World's Smallest CSV Parser (C#)
World's Smallest CSV Parser (C#)
This is a CSV (RFC4180) Parser in 100 LOC.
It does not give you spaghetti abstractions like other libraries. The API is
simply this:
while (true) {
List<string>? columns = parser.ReadNextRow();
if (columns == null) {
Console.WriteLine("End of file reached");
break;
}
var prettyRow = System.Text.Json.JsonSerializer.Serialize(columns);
Console.WriteLine($"Read row: {prettyRow}");
}
You can easily create your own high level DictReader or whatever extravagance
you w...
Read more at github.com