mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
attempt to ignore nulls in JSON, still fails
This commit is contained in:
parent
02fda447aa
commit
aa4c4f637b
2 changed files with 8 additions and 3 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using FilterLists.Services;
|
||||
using FilterLists.Services.Contracts;
|
||||
using FilterLists.Services.Contracts;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace FilterLists.Api.Controllers
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace FilterLists.Api.DependencyInjection.Extensions
|
||||
{
|
||||
|
|
@ -6,7 +7,12 @@ public static class ConfigureServicesCollection
|
|||
{
|
||||
public static IServiceCollection RegisterFilterListsApi(this IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
services.AddMvc()
|
||||
.AddJsonOptions(options =>
|
||||
{
|
||||
//TODO: determine why null values still get returned
|
||||
options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
|
||||
});
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue