I am in the process of migrating an application from dotnetcore2.0 to 3.1 and I am facing some issues with the newtonsoft dependency.
services.AddAuthorization()
.AddApiExplorer()
.AddMvcOptions(option => option.EnableEndpointRouting = false)
.AddNewtonsoftJson(n =>
{
n.SerializerSettings.Converters.Add(new StringEnumConverter());
n.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
n.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
})
.AddDataAnnotations();