Soenneker.Extensions.Generic 4.0.1971

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Extensions.Generic --version 4.0.1971
                    
NuGet\Install-Package Soenneker.Extensions.Generic -Version 4.0.1971
                    
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="Soenneker.Extensions.Generic" Version="4.0.1971" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.Generic" Version="4.0.1971" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.Generic" />
                    
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 Soenneker.Extensions.Generic --version 4.0.1971
                    
#r "nuget: Soenneker.Extensions.Generic, 4.0.1971"
                    
#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 Soenneker.Extensions.Generic@4.0.1971
                    
#: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=Soenneker.Extensions.Generic&version=4.0.1971
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Generic&version=4.0.1971
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.Generic

Generic extensions for serializing any value to a stream or a Base64-encoded JSON string.

Installation

dotnet add package Soenneker.Extensions.Generic

Quick start

using Soenneker.Extensions.Generic;

var order = new { Id = 42, Status = "Ready" };

string encoded = order.ToBase64Json();
MemoryStream jsonStream = await order.ToStream();

ToStream(Stream) is also available when you want to supply and reuse the destination stream yourself.

Available methods

  • ToStream(Stream, CancellationToken) - Serializes the value as JSON into the supplied stream, rewinds it to position zero, and returns that same stream for reuse.
  • ToStream(CancellationToken) - Creates a new MemoryStream, writes the value as JSON, rewinds it, and returns it ready to read. Dispose the returned stream when finished.
  • ToBase64Json() - Serializes the value to UTF-8 JSON bytes and returns their Base64 representation; a null value throws ArgumentNullException.
Product Compatible and additional computed target framework versions.
.NET 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
4.0.1993 0 9/7/2026
4.0.1992 351 9/5/2026
4.0.1991 64 9/5/2026
4.0.1990 88 9/5/2026
4.0.1989 51 9/4/2026
4.0.1988 48 9/4/2026
4.0.1987 44 9/4/2026
4.0.1986 51 9/4/2026
4.0.1985 45 9/4/2026
4.0.1984 82 9/4/2026
4.0.1983 67 9/4/2026
4.0.1982 80 9/3/2026
4.0.1981 414 9/1/2026
4.0.1980 71 9/1/2026
4.0.1979 90 8/31/2026
4.0.1978 84 8/31/2026
4.0.1977 82 8/31/2026
4.0.1976 90 8/31/2026
4.0.1975 86 8/30/2026
4.0.1971 84 8/30/2026
Loading failed

Update dependency Soenneker.Extensions.Arrays.Bytes to 4.0.66 (#2467)