Skip to content

Commit

Permalink
Update 1.9.0 Release notes after STJ recent changes (OrchardCMS#15587)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Mar 25, 2024
1 parent e151098 commit 4a01876
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/docs/releases/1.9.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ Release date: Not yet released

The utilization of [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json) has been discontinued in both **YesSql** and **OrchardCore**. Instead, we have transitioned to utilize `System.Text.Json` due to its enhanced performance capabilities. To ensure compatibility with `System.Text.Json` during the serialization or deserialization of objects, the following steps need to be undertaken:

- If your custom `Document` includes a collection with a getter-only property, it is imperative to incorporate a setter or utilize the `init` modifier to facilitate the assignment of values by `System.Text.Json`. For instance:

```csharp
public class MediaProfilesDocument : Document
{
public Dictionary<string, MediaProfile> MediaProfiles { get; } = new(StringComparer.OrdinalIgnoreCase);
}
```

Should be changed to the following instead:

```csharp
public class MediaProfilesDocument : Document
{
public Dictionary<string, MediaProfile> MediaProfiles { get; init; } = new(StringComparer.OrdinalIgnoreCase);
}
```

- If you are using a custom deployment steps, change how you register it by using the new `AddDeployment<>` extension. This extension adds a new service that is required for proper serialization. For instance, instead of registering your deployment step like this:

```csharp
Expand Down

0 comments on commit 4a01876

Please sign in to comment.