Skip to content

Commit aedb5f1

Browse files
committed
Prepare release 9.1.0-beta1 for the JSON helper package.
1 parent 7c41e59 commit aedb5f1

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

DateTimeOnly.Json/DateTimeOnly.Json.csproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@
5252

5353
<PropertyGroup>
5454
<PackageReleaseNotes>
55-
- The `Portable.System.DateTimeOnly` updated to version 9.0.0-beta1, so we need this package to be pre-released as well.
55+
- The `System.Text.Json.DateOnly` class was renamed to `System.Text.Json.JsonDateOnly` to prevent ambiguous name resolution problems.
56+
- The `System.Text.Json.TimeOnly` class was renamed to `System.Text.Json.JsonTimeOnly` to prevent ambiguous name resolution problems.
57+
- Thanks, @Swimburger, for pointing out this problem with breaking out the existing code just by adding the NuGet package.
5658
</PackageReleaseNotes>
57-
<AssemblyVersion>9.0.0.1</AssemblyVersion>
58-
<FileVersion>9.0.0.1</FileVersion>
59-
<Version>9.0.0</Version>
59+
<AssemblyVersion>9.1.0.0</AssemblyVersion>
60+
<FileVersion>9.1.0.0</FileVersion>
61+
<Version>9.1.0-beta1</Version>
6062
</PropertyGroup>
6163

6264
<PropertyGroup>

DateTimeOnly.Json/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The main disadvantage of this "direct" approach for configuring [`System.DateOnl
1818

1919
Unfortunately, attributes-based approach will not work if you'll try to use [`System.DateOnly`](https://docs.microsoft.com/dotnet/api/system.dateonly) and/or [`System.TimeOnly`](https://docs.microsoft.com/dotnet/api/system.timeonly) data types with the [`System.Text.Json`](https://docs.microsoft.com/dotnet/api/system.text.json) source generators. The only way to make generated code compilable is to use any type names not equal to [`System.DateOnly`](https://docs.microsoft.com/dotnet/api/system.dateonly) and/or [`System.TimeOnly`](https://docs.microsoft.com/dotnet/api/system.timeonly) available in object graph processed by the source generator.
2020

21-
The package provides two helper types: `System.Text.Json.DateOnly` and `System.Text.Json.TimeOnly` (same class names but different full type names). These types have no public properties but they provide implicit conversion operations from/to the [`System.DateOnly`](https://docs.microsoft.com/dotnet/api/system.dateonly) and [`System.TimeOnly`](https://docs.microsoft.com/dotnet/api/system.timeonly) data types respectively. You can use them safely in your JSON-mapping objects with any type of serialization available in the [`System.Text.Json`](https://docs.microsoft.com/dotnet/api/system.text.json) library. These types have custom [`System.Text.Json.Serialization.JsonConverterAttribute`](https://docs.microsoft.com/dotnet/api/system.text.json.serialization.jsonconverterattribute) applied with helper converters that delegate work to `System.Text.Json.DateOnlyConverter` and `System.Text.Json.TimeOnlyConverter` types without code duplication.
21+
The package provides two helper types: `System.Text.Json.JsonDateOnly` and `System.Text.Json.JsonTimeOnly` to solve this problem. These types have no public properties, but they provide implicit conversion operations from/to the [`System.DateOnly`](https://docs.microsoft.com/dotnet/api/system.dateonly) and [`System.TimeOnly`](https://docs.microsoft.com/dotnet/api/system.timeonly) data types respectively. You can use them safely in your JSON-mapping objects with any kind of serialization available in the [`System.Text.Json`](https://docs.microsoft.com/dotnet/api/system.text.json) library. These types have custom [`System.Text.Json.Serialization.JsonConverterAttribute`](https://docs.microsoft.com/dotnet/api/system.text.json.serialization.jsonconverterattribute) applied with helper converters that delegate work to `System.Text.Json.DateOnlyConverter` and `System.Text.Json.TimeOnlyConverter` types without code duplication.
2222

2323
## Contributors
2424

0 commit comments

Comments
 (0)