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
<PackageReference Include="Soenneker.Enums.JsonOptions" Version="4.0.738" />
<PackageVersion Include="Soenneker.Enums.JsonOptions" Version="4.0.738" />
<PackageReference Include="Soenneker.Enums.JsonOptions" />
paket add Soenneker.Enums.JsonOptions --version 4.0.738
#r "nuget: Soenneker.Enums.JsonOptions, 4.0.738"
#:package Soenneker.Enums.JsonOptions@4.0.738
#addin nuget:?package=Soenneker.Enums.JsonOptions&version=4.0.738
#tool nuget:?package=Soenneker.Enums.JsonOptions&version=4.0.738
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 | 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. |
-
net10.0
- Soenneker.Gen.EnumValues (>= 4.0.47)
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 |
Update dependency Soenneker.Gen.EnumValues to 4.0.47 (#1356)