Soenneker.Enums.JsonLibrary
4.0.732
Prefix Reserved
dotnet add package Soenneker.Enums.JsonLibrary --version 4.0.732
NuGet\Install-Package Soenneker.Enums.JsonLibrary -Version 4.0.732
<PackageReference Include="Soenneker.Enums.JsonLibrary" Version="4.0.732" />
<PackageVersion Include="Soenneker.Enums.JsonLibrary" Version="4.0.732" />
<PackageReference Include="Soenneker.Enums.JsonLibrary" />
paket add Soenneker.Enums.JsonLibrary --version 4.0.732
#r "nuget: Soenneker.Enums.JsonLibrary, 4.0.732"
#:package Soenneker.Enums.JsonLibrary@4.0.732
#addin nuget:?package=Soenneker.Enums.JsonLibrary&version=4.0.732
#tool nuget:?package=Soenneker.Enums.JsonLibrary&version=4.0.732
Soenneker.Enums.JsonLibrary
An integer-backed enum-value type for selecting between System.Text.Json and Newtonsoft.Json in APIs that support both serializers.
Install
dotnet add package Soenneker.Enums.JsonLibrary
Usage
using Soenneker.Enums.JsonLibrary;
JsonLibraryType library = JsonLibraryType.SystemTextJson;
int value = library.Value; // 0
if (JsonLibraryType.TryFromValue(configuredValue, out JsonLibraryType? parsed))
{
library = parsed;
}
| Value | Numeric value | Serializer |
|---|---|---|
SystemTextJson |
0 |
System.Text.Json |
Newtonsoft |
1 |
Newtonsoft.Json / Json.NET |
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 when reading configuration or requests. FromName and TryFromName use the C# member names.
This package identifies a serializer; it does not serialize content or provide serializer settings. The consuming API must perform the dispatch and define the options used by each library. The two serializers can differ in naming, converters, reference handling, null handling, and accepted input, so selecting one does not guarantee identical payload behavior.
| 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.46)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Enums.JsonLibrary:
| Package | Downloads |
|---|---|
|
Soenneker.Utils.Json
A utility library handling (de)serialization and other useful JSON functionalities |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.732 | 0 | 8/30/2026 |
| 4.0.731 | 58 | 8/30/2026 |
| 4.0.730 | 376 | 8/29/2026 |
| 4.0.728 | 23,592 | 8/21/2026 |
| 4.0.727 | 10,857 | 8/18/2026 |
| 4.0.726 | 1,172 | 8/18/2026 |
| 4.0.725 | 34,883 | 8/7/2026 |
| 4.0.724 | 20,592 | 7/28/2026 |
| 4.0.723 | 2,610 | 7/27/2026 |
| 4.0.722 | 41,538 | 7/16/2026 |
| 4.0.721 | 2,547 | 7/16/2026 |
| 4.0.720 | 106 | 7/16/2026 |
| 4.0.719 | 36,737 | 7/2/2026 |
| 4.0.718 | 17,984 | 6/19/2026 |
| 4.0.717 | 8,377 | 6/18/2026 |
| 4.0.716 | 55,886 | 6/5/2026 |
| 4.0.715 | 736 | 6/5/2026 |
| 4.0.714 | 53,529 | 5/1/2026 |
| 4.0.713 | 18,065 | 4/22/2026 |
| 4.0.712 | 47,641 | 3/31/2026 |
Update dependency Soenneker.Gen.EnumValues to 4.0.46 (#1348)