Custom Json Converter with dependecy
问题 I have to use a custom JsonConverter with ASP.NET Core for a reason, and I need to use it with JsonInputFormatter . The only way I've found is to use AddJsonOption extension method like this: services .AddMvc() .AddJsonOptions(jso => jso.SerializerSettings.Converters.Add(new CustomConverter())) But it has a flaw: CustomConverter requires a dependency from a DI container which cannot be easily solved at configuration time. So the question: is there any programmer friendly way to supply a