Kizspy | Question: 16
(Choose 1 answer)
How to configure JSON Serialization in ASP.NET Core?
A. public void ConfigureServices (IServiceCollection services)
{ services.AddControllers With Views().AddJsonOptions(options options.JsonSerializer Options. PropertyNamingPolicy = null);
} B. public void Configure (IServiceCollection services)
{
services.AddControllers With Views().AddJsonOptions(options => options.JsonSerializerOptions.PropertyNaming Policy = null);
}
C. public void ConfigureServices (IApplicationBuilder services)
{
services.AddControllersWith Views().AddJsonOptions(options options.JsonSerializerOptions. PropertyNamingPolicy = null);
} D. public void ConfigureServices (IEnvironmentBuilder services)
{ services.AddControllers With Views().AddJsonOptions(options => options.JsonSerializerOptions.PropertyNaming Policy = null);
}