microsoft.aspnetcore.mvc.newtonsoft json 5.0.0 is not compatible with netcoreapp3.1 code example
Example: asp net core use newtonsoft json
services.AddControllers().AddNewtonsoftJson();
services.AddControllersWithViews().AddNewtonsoftJson();
services.AddRazorPages().AddNewtonsoftJson();