Soenneker.Enums.JsonOptions
11.0.765
Prefix Reserved
dotnet add package Soenneker.Enums.JsonOptions --version 11.0.765
NuGet\Install-Package Soenneker.Enums.JsonOptions -Version 11.0.765
<PackageReference Include="Soenneker.Enums.JsonOptions" Version="11.0.765" />
<PackageVersion Include="Soenneker.Enums.JsonOptions" Version="11.0.765" />
<PackageReference Include="Soenneker.Enums.JsonOptions" />
paket add Soenneker.Enums.JsonOptions --version 11.0.765
#r "nuget: Soenneker.Enums.JsonOptions, 11.0.765"
#:package Soenneker.Enums.JsonOptions@11.0.765
#addin nuget:?package=Soenneker.Enums.JsonOptions&version=11.0.765
#tool nuget:?package=Soenneker.Enums.JsonOptions&version=11.0.765
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Gen.EnumValues (>= 11.0.66)
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.765 | 0 | 11/11/2026 |
| 11.0.764 | 0 | 11/11/2026 |
| 11.0.763 | 56,076 | 10/26/2026 |
| 11.0.762 | 105 | 10/26/2026 |
| 4.0.761 | 30,193 | 10/15/2026 |
| 4.0.760 | 234 | 10/14/2026 |
| 4.0.758 | 1,128 | 10/14/2026 |
| 4.0.757 | 4,855 | 10/14/2026 |
| 4.0.756 | 1,307 | 10/14/2026 |
| 4.0.752 | 119 | 10/13/2026 |
| 4.0.751 | 1,567 | 10/12/2026 |
| 4.0.749 | 3,636 | 10/12/2026 |
| 4.0.748 | 12,850 | 10/11/2026 |
| 4.0.747 | 1,183 | 10/11/2026 |
| 4.0.746 | 43,228 | 9/30/2026 |
| 4.0.745 | 28,360 | 9/25/2026 |
| 4.0.744 | 277 | 9/24/2026 |
| 4.0.743 | 28,559 | 9/15/2026 |
| 4.0.741 | 27,491 | 9/12/2026 |
| 4.0.740 | 135 | 9/12/2026 |
Update dependency Soenneker.Gen.EnumValues to 11.0.66 (#1448)