SuperConvert is a lightweight .NET library for converting between common data formats with a simple API.
SuperConvert(core conversions): NuGetSuperConvert.Files(file conversion helpers): NuGetSuperConvert.Abstraction(DI-friendly service abstraction): NuGet
- Updated NuGet package icon (
electric-generator.png).
- Fixed CSV escaping/unescaping issue for quote characters (
"). - Export now escapes quotes as doubled quotes (
"") in CSV fields. - Import now correctly parses quoted values and restores escaped quotes.
- Added regression tests for CSV quote handling and quoted comma fields.
- JSON to
DataTable DataTableto JSON- JSON to CSV / CSV to JSON
DataTableto CSV / CSV toDataTable- JSON to XLS /
DataTableto XLS - Gregorian and Hijri date conversion
- String and file Base64 conversion helpers
Current package targets:
netcoreapp3.1net5.0net6.0net7.0net8.0net9.0net10.0
Install-Package SuperConvert -Version 1.0.5.2Install-Package SuperConvert.Files -Version 1.0.4.0Install-Package SuperConvert.Abstraction -Version 1.0.0.4using SuperConvert.Extensions;
using System.Data;string customers = "[{\"CompanyID\":\"k123\",\"Role\":\"Admin\",\"Country\":\"UK\"}]";
DataTable dt = customers.ToDataTable("TableName");string json = dt.ToJson();string path = string.Empty;
string fileName = "DtToCsv";
string csvPath = dt.ToCsv(path, fileName);DataTable csvDt = ExcelConverter.CsvToDataTable(csvPath);Input text:
The "elephant" in the room.CSV field output:
"The ""elephant"" in the room."Import returns:
The "elephant" in the room.| Package | Version | Link |
|---|---|---|
| SuperConvert | 1.0.5.2 | https://www.nuget.org/packages/SuperConvert/1.0.5.2 |
| SuperConvert.Files | 1.0.4.0 | https://www.nuget.org/packages/SuperConvert.Files |
| SuperConvert.Abstraction | 1.0.0.4 | https://www.nuget.org/packages/SuperConvert.Abstraction |