Gets or sets a function that creates default JsonSerializerSettings. Default settings are automatically used by serialization methods on JsonConvert, and ToObject () and FromObject(Object) on JToken. To serialize without using any default settings create a JsonSerializer with Create().
AddMvc returns an IMvcBuilder implementation, which has a corresponding AddJsonOptions extension method. The new-style methods AddControllers, AddControllersWithViews, and AddRazorPages also return an IMvcBuilder implementation. Chain with these in the same way you would chain with AddMvc:
Of course, one would celebrate property naming PascalCase, NA at the moment...
So null for PropertyNamingPolicy means PascalCase, which is obviously not very good.
You can try System.Text.Json, the newly released Json nuget package converter. Newtonsoft no longer works very well in .Net Core.
Startup.cs as below
You can write this code inside the configirationSetting method.