Use Newtonsoft.Json in an ASP.NET Core 3.0 MVC project
-
Install the Microsoft.AspNetCore.Mvc.NewtonsoftJson package.
-
Update
Startup.ConfigureServices
to callAddNewtonsoftJson
.services.AddMvc()
.AddNewtonsoftJson();
AddNewtonsoftJson
is compatible with the new MVC service registration methods:AddRazorPages
AddControllersWithViews
AddControllers