PocketCsvReader reads CSV and other structured text through forward-only data readers and streaming row outputs. Optional packages support JSON/JSONC, NDJSON, fixed-width, LTSV, logfmt, web logs, and security logs. The projects target .NET 8, 9, and 10.
Documentation · Installation · Contributing
| Package | Purpose |
|---|---|
PocketCsvReader |
CSV/TSV and shared APIs |
PocketCsvReader.Json |
JSON and JSONC |
PocketCsvReader.Ndjson |
NDJSON |
PocketCsvReader.FixedWidth |
Fixed character positions |
PocketCsvReader.KeyValue |
LTSV and logfmt |
PocketCsvReader.WebLogs |
Common, Combined, W3C |
PocketCsvReader.SecurityLogs |
CEF and LEEF |
PocketCsvReader.Arrow |
Apache Arrow output |
PocketCsvReader.Chrononuensis |
Temporal period parsers |
dotnet add package PocketCsvReaderusing System.Text;
using PocketCsvReader.Configuration;
var csv = new CsvReaderBuilder()
.WithDialect(d => d.WithHeader().WithLineTerminator("\n"))
.Build();
using var stream = new MemoryStream(Encoding.UTF8.GetBytes("Id,Name\n1,Ada\n"));
using var reader = csv.ToDataReader(stream);
while (reader.Read())
Console.WriteLine($"{reader.GetInt32(0)}: {reader.GetString(1)}");
// 1: AdaSee output models, reader filtering, object mapping, async reading, inference, and performance guidance for complete behavior and limitations.
Shared ownership, null, conversion, and performance contracts have their authoritative home in the documentation rather than duplicated README sections.