Soenneker.Enums.JsonOptions 4.0.738

Prefix Reserved
dotnet add package Soenneker.Enums.JsonOptions --version 4.0.738
                    
NuGet\Install-Package Soenneker.Enums.JsonOptions -Version 4.0.738
                    
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="4.0.738" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Enums.JsonOptions" Version="4.0.738" />
                    
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 4.0.738
                    
#r "nuget: Soenneker.Enums.JsonOptions, 4.0.738"
                    
#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@4.0.738
                    
#: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=4.0.738
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Enums.JsonOptions&version=4.0.738
                    
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 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 (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
4.0.738 0 9/4/2026
4.0.737 18,555 8/30/2026
4.0.736 996 8/30/2026
4.0.735 90 8/30/2026
4.0.733 38,208 8/21/2026
4.0.732 13,322 8/18/2026
4.0.731 157 8/18/2026
4.0.730 40,320 8/7/2026
4.0.729 94 8/7/2026
4.0.728 17,914 7/28/2026
4.0.727 2,733 7/27/2026
4.0.726 31,771 7/16/2026
4.0.725 124 7/16/2026
4.0.724 51,852 7/2/2026
4.0.723 18,609 6/19/2026
4.0.722 9,279 6/18/2026
4.0.721 58,354 6/5/2026
4.0.720 149 6/5/2026
4.0.719 56,789 5/1/2026
4.0.718 18,774 4/22/2026
Loading failed

Update dependency Soenneker.Gen.EnumValues to 4.0.47 (#1356)