Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix misleading code sample #329

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Odata-docs/odatalib/release-notes/odatalib-8.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ behaviour of `Utf8JsonWriter` which uses `+00:00` like `2022-11-09T09:42:30+00:0
You can change the JSON writer used by `ODataMessageWriter` and by injecting an implementation of `IJsonWriterFactory` to the service provider attached to the `IODataRequestMessage` or `IODataResponseMessage`. The implementation that corresponds to the old default writer is called `ODataJsonWriterFactory`:

```csharp
services.AddService<IJsonWriterFactory>(ODataJsonWriterFactory.Default);
services.AddSingleton<IJsonWriterFactory>(new ODataJsonWriterFactory());
```

#### Changing `JavaScriptEncoder`
Expand All @@ -63,7 +63,7 @@ If you want to change which characters are escaped or encoded you can change the
and specifying the instance of `JavaScriptEncoder` to be used:

```csharp
services.AddService<IJsonWriterFactory>(new ODataUtf8JsonWriterFactory(JavaScriptEncoder.Default));
services.AddSingleton<IJsonWriterFactory>(new ODataUtf8JsonWriterFactory(JavaScriptEncoder.Default));
```

### Changed `ODataResource.Properties` property type
Expand Down