UchinaSystems.CsvToJson 0.1.3

dotnet add package UchinaSystems.CsvToJson --version 0.1.3
                    
NuGet\Install-Package UchinaSystems.CsvToJson -Version 0.1.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UchinaSystems.CsvToJson" Version="0.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UchinaSystems.CsvToJson" Version="0.1.3" />
                    
Directory.Packages.props
<PackageReference Include="UchinaSystems.CsvToJson" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add UchinaSystems.CsvToJson --version 0.1.3
                    
#r "nuget: UchinaSystems.CsvToJson, 0.1.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package UchinaSystems.CsvToJson@0.1.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=UchinaSystems.CsvToJson&version=0.1.3
                    
Install as a Cake Addin
#tool nuget:?package=UchinaSystems.CsvToJson&version=0.1.3
                    
Install as a Cake Tool

UchinaSystems.CsvToJson (.NET)

High-performance CSV → JSON conversion powered by a Rust core via a small C ABI.

  • Cross-platform native library loaded via runtimes/<rid>/native/
  • Same options as the JS package: headers, delimiter, and header key case normalization

Install (from local build or NuGet)

  • NuGet (once published):
    • Package Id: UchinaSystems.CsvToJson
  • Or build locally and reference the project/package (.nupkg)

Quick Start

using System.Text;
using Csvjson;

var csv = "YouTube link,IMPORT\nhttps://yt.com,YES\n";
var bytes = Encoding.UTF8.GetBytes(csv);
var json = Parser.Parse(bytes, headers: true, delimiter: null, caseStyle: "pascal");
Console.WriteLine(json);

Result:

[{"YouTubeLink":"https://yt.com","Import":"YES"}]

API

namespace Csvjson
{
    public static class Parser
    {
        // Returns JSON string (array of objects)
        public static string Parse(
            byte[] bytes,
            bool? headers = null,   // default true when null
            byte? delimiter = null, // default 44 (',') when null
            string? caseStyle = null // one of: pascal|camel|snake|kebab|title|lower|upper
        );
    }
}

Case Normalization Examples

  • "YouTube link" → "YouTubeLink" (pascal)
  • "IMPORT" → "Import" (pascal)
  • Mixed-case tokens like "YouTube" are preserved

Building Locally

This repo includes a Rust C ABI crate and a script to place the native library into the correct runtimes/ folder for packing.

# Build native lib for your platform and copy to runtimes/<rid>/native/
node scripts/build-dotnet.mjs

# Pack the NuGet package
dotnet pack ./dotnet/Csvjson/Csvjson.csproj -c Release

RIDs used:

  • macOS: osx-x64, osx-arm64 → libcsvjson_cabi.dylib
  • Linux: linux-x64, linux-arm64 → libcsvjson_cabi.so
  • Windows: win-x64, win-arm64 → csvjson_cabi.dll

To ship multiple RIDs, repeat the native build for each platform (or cross-compile) and ensure the outputs exist under dotnet/Csvjson/runtimes/<rid>/native/ before packing.

Notes

  • The parser is compute-only and pure; it doesn’t perform IO.
  • For very large CSVs, prefer Node native add-on in server-side environments; the .NET wrapper is ideal for C# backends that want a simple drop-in conversion step.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.3 129 10/11/2025
0.1.2 129 10/11/2025
0.1.1 132 10/11/2025