Rhinobyte.Extensions.Json
8.0.0-preview.1
dotnet add package Rhinobyte.Extensions.Json --version 8.0.0-preview.1
NuGet\Install-Package Rhinobyte.Extensions.Json -Version 8.0.0-preview.1
<PackageReference Include="Rhinobyte.Extensions.Json" Version="8.0.0-preview.1" />
paket add Rhinobyte.Extensions.Json --version 8.0.0-preview.1
#r "nuget: Rhinobyte.Extensions.Json, 8.0.0-preview.1"
// Install Rhinobyte.Extensions.Json as a Cake Addin #addin nuget:?package=Rhinobyte.Extensions.Json&version=8.0.0-preview.1&prerelease // Install Rhinobyte.Extensions.Json as a Cake Tool #tool nuget:?package=Rhinobyte.Extensions.Json&version=8.0.0-preview.1&prerelease
Rhinobyte.Extensions.Json
This library contains extensions for the .NET System.Text.Json library. The extensions provide additional features and convenience methods for working with JSON data.
AssumeUtcDateTimeOffsetConverter
A custom JsonConverter for DateTimeOffset that assumes a fallback of UTC Timezone information should be used if the JSON token does not include time zone details.
The default converter currently always assumes the system local time zone should be used if no time zone information is provided in the JSON token. This can lead to incorrect date time values being parsed if the JSON token was serialized with a different time zone than the system local time zone.
PolymorphicFallbackTypeResolver (.NET 8.0+)
A customized type info resolver that will check for a specified fallback type via a JsonPolymorphicDeserializationFallbackAttribute when deserializing polymorphic JSON using an interface for the polymorphic base type.
Example usage:
public static readonly JsonSerializerOptions OptionsWithPolymorphicFallbackTypeResolver = new JsonSerializerOptions
{
TypeInfoResolver = new PolymorphicFallbackTypeResolver()
};
See the PolymorphicFallbackTypeResolverTests for additional examples on how to use this feature.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.0.0-preview.1 | 943 | 8/4/2024 |
v8.0.0-preview.1
- Initial release of Rhinobyte.Extensions.Json package. Contains the AssumeUtcDateTimeOffsetConverter. Also contains the PolymorphicFallbackTypeResolver and JsonPolymorphicDeserializationFallbackAttribute when targetting .NET8.0 or greater.