Skip to content

Commit

Permalink
Fix misleading code sample (MicrosoftDocs#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
habbes authored Sep 12, 2024
1 parent 7f7e466 commit 6b7eb59
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 6b7eb59

Please sign in to comment.