Soenneker.Enums.JsonOptions 11.0.766

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

Soenneker.Enums.JsonOptions

An integer-backed enum-value type for selecting one of the JSON profiles used by Soenneker JSON utilities.

Install

dotnet add package Soenneker.Enums.JsonOptions

Usage

using Soenneker.Enums.JsonOptions;

JsonOptionType profile = JsonOptionType.PrettySafe;
int value = profile.Value; // 3

if (JsonOptionType.TryFromValue(configuredValue, out JsonOptionType? parsed))
{
    profile = parsed;
}
Value Numeric value Intended profile
Web 0 Compact web defaults with camel-case property names
General 1 Compact general defaults without camel-case conversion
Pretty 2 Indented general output with relaxed escaping
PrettySafe 3 Indented general output with standard escaping

The generated System.Text.Json converter writes the numeric value and accepts only defined values when reading. FromValue throws for an unknown integer; use TryFromValue at configuration or request boundaries. FromName and TryFromName use the C# member names.

This package supplies profile identifiers, not JsonSerializerOptions. The component receiving the value defines the concrete settings; in the Soenneker options collection these profiles also differ in null handling, comment handling, and enum converters.

Do not use Pretty for JSON that will be embedded in HTML or otherwise cross an untrusted output boundary: its relaxed encoder allows characters that the default encoder escapes. PrettySafe keeps standard escaping, but output-context encoding is still the caller's responsibility.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Enums.JsonOptions:

Package Downloads
Soenneker.Json.OptionsCollection

A collection of common options for System.Text.Json and JSON.net

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.766 166 11/14/2026
11.0.765 11,031 11/11/2026
11.0.764 63 11/11/2026
11.0.763 67,860 10/26/2026
11.0.762 108 10/26/2026
4.0.761 30,364 10/15/2026
4.0.760 237 10/14/2026
4.0.758 1,129 10/14/2026
4.0.757 4,858 10/14/2026
4.0.756 1,310 10/14/2026
4.0.752 122 10/13/2026
4.0.751 1,585 10/12/2026
4.0.749 3,697 10/12/2026
4.0.748 12,855 10/11/2026
4.0.747 1,185 10/11/2026
4.0.746 43,463 9/30/2026
4.0.745 28,361 9/25/2026
4.0.744 277 9/24/2026
4.0.743 28,569 9/15/2026
4.0.741 27,496 9/12/2026
Loading failed

Update dependency Soenneker.Gen.EnumValues to 11.0.67 (#1453)