Remove Newtonsoft JSON.NET from Blazor WASM template (#14061)

This commit is contained in:
Adrian Wright 2019-09-18 18:24:29 +01:00 committed by Artak
parent ddfc854449
commit b7da2e4343
2 changed files with 1 additions and 3 deletions

View File

@ -7,7 +7,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Blazor.Server" Version="$(TemplateBlazorPackageVersion)" /> <PackageReference Include="Microsoft.AspNetCore.Blazor.Server" Version="$(TemplateBlazorPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="$(TemplateComponentsPackageVersion)" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.ResponseCompression; using Microsoft.AspNetCore.ResponseCompression;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Newtonsoft.Json.Serialization;
using System.Linq; using System.Linq;
namespace BlazorWasm_CSharp.Server namespace BlazorWasm_CSharp.Server
@ -14,7 +13,7 @@ namespace BlazorWasm_CSharp.Server
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
services.AddMvc().AddNewtonsoftJson(); services.AddMvc();
services.AddResponseCompression(opts => services.AddResponseCompression(opts =>
{ {
opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat( opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(