Manipulating json behaviour in .NET Core application
services.AddMvc()
.AddJsonOptions(o =>
{
if (o.SerializerSettings.ContractResolver != null)
{
var castedResolver = o.SerializerSettings.ContractResolver
as DefaultContractResolver;
// Manipulate json behaviour here.
castedResolver.NamingStrategy = null;
}
});