port Newtwonsoft dep

This commit is contained in:
Collin M. Barrett 2019-10-01 15:26:30 -05:00
parent 821484801e
commit 0de168dbc5
2 changed files with 2 additions and 1 deletions

View file

@ -28,7 +28,7 @@ private static void ConfigureCookiePolicy(this IServiceCollection services) =>
private static void AddMvcCustom(this IServiceCollection services) =>
services.AddMvc()
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1)
.AddJsonOptions(opts =>
.AddNewtonsoftJson(opts =>
{
opts.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
opts.SerializerSettings.ContractResolver = new SkipEmptyContractResolver();

View file

@ -42,6 +42,7 @@
<ItemGroup>
<PackageReference Include="Humanizer.Core" Version="2.7.9" />
<PackageReference Include="JetBrains.Annotations" Version="2019.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.0.0-preview8.19405.7" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.4" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha" />