diff --git a/README.md b/README.md index d384f2c33..d96ae1e5f 100644 --- a/README.md +++ b/README.md @@ -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(); +var options = new JsonSerializerOptions() { + TypeInfoResolver = MyJsonSerializerContext.Default +}; var gitHubApi = RestService.For("https://api.github.com", new RefitSettings {