Inject a service into a System.Text.Json converter

added by DotNetKicks
8/31/2020 8:59:21 AM

1226 Views

Most JSON converters are fairly simple, and typically self-contained. But once in a while, you need to do something a little more complex in a converter, and you end up needing to call a service. However, there's no built-in dependency injection in System.Text.Json converters... How can you access the service you need?


0 comments