Expressif.Serialization 2.48.0

Prefix Reserved
dotnet add package Expressif.Serialization --version 2.48.0
                    
NuGet\Install-Package Expressif.Serialization -Version 2.48.0
                    
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="Expressif.Serialization" Version="2.48.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Expressif.Serialization" Version="2.48.0" />
                    
Directory.Packages.props
<PackageReference Include="Expressif.Serialization" />
                    
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 Expressif.Serialization --version 2.48.0
                    
#r "nuget: Expressif.Serialization, 2.48.0"
                    
#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 Expressif.Serialization@2.48.0
                    
#: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=Expressif.Serialization&version=2.48.0
                    
Install as a Cake Addin
#tool nuget:?package=Expressif.Serialization&version=2.48.0
                    
Install as a Cake Tool

Expressif.Serialization

Converts JSON and CSV input into Expressif values without depending on the CLI. The library targets .NET 8, 9, and 10. Expressif evaluation has no dependency on it.

using Expressif.Serialization;

var value = JsonValueReader.Read("""{"name":"Ada","scores":[1,2,null]}""");
var rows = JsonValueReader.ReadRows("""[{"name":"Ada"},{"name":"Grace"}]""");

using var input = File.OpenRead("people.csv");
foreach (var row in CsvValueReader.Read(input, [new("delimiter", ";")]))
    Console.WriteLine(row);

JsonValueReader.Read accepts text, a TextReader, or a UTF-8 stream. Objects become RecordValue, arrays become object?[], and JSON null becomes null. Numbers use int, then decimal, then double, in that order when representable. Duplicate object keys keep the last value and the original field order. ReadRows expands a root array into rows and wraps any other root in one row. Malformed JSON throws JsonException (including its derived types).

CsvValueReader.Read lazily enumerates rows from the stream's current position. It disposes its CSV reader when enumeration finishes, fails, or stops early, but leaves the input stream open. Enumerations consume the stream and are not replayable without repositioning it. OpenDataReader exposes the same conversion source to hosts needing IDataReader; leaveOpen: false transfers stream ownership on success. The caller must dispose the stream if opening fails. SourceRows.Read converts data readers or enumerable sources into rows and disposes consumed readers.

CSV defaults match the CLI: comma delimiter, double quotes, CRLF line terminator, and a required first header row. Headers must be nonempty and unique ignoring case. Rows must have consistent widths. Use new("line-terminator", "\n") for LF input. new("header", false) produces column1, column2, etc. Configured header-rows or header-repeat lets the CSV parser consume headers and also uses generated column names, preserving existing CLI behavior. Scalar mode requires one column. CSV cells retain the existing profile's conversion rules, including null sequences; CSV syntax, profile, header, and row-shape failures produce FormatException.

CsvSourceOption takes a name and an already parsed value. Hosts own argument parsing. Text and character settings accept strings; booleans accept bool; header-rows and comment-rows accept nonempty object?[] containing positive one-based integers. OriginalText optionally preserves supplied text in diagnostics. Options are applied in order, so the last occurrence wins.

Supported options: delimiter, line-terminator, quote-char, double-quote, escape-char, header, header-rows, header-join, header-repeat, comment-char, comment-rows, null-sequence, missing-cell, skip-initial-space, array-delimiter, array-prefix, and array-suffix.

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 is compatible.  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 is compatible.  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.

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
2.48.0 0 9/6/2026