Skip to content
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,9 @@ public class Foo
To apply the benefits of the new [JSON source generator](https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-source-generator/) for System.Text.Json added in .NET 6, you can use `SystemTextJsonContentSerializer` with a custom instance of `RefitSettings` and `JsonSerializerOptions`:

```csharp
var options = new JsonSerializerOptions();
options.AddContext<MyJsonSerializerContext>();
var options = new JsonSerializerOptions() {
TypeInfoResolver = MyJsonSerializerContext.Default
};

var gitHubApi = RestService.For<IGitHubApi>("https://api.github.com",
new RefitSettings {
Expand Down