How to log ASP.NET Core input JSON serialization errors
I've solved this with adding an error handler in Startup.cs:
services.AddMvc()
.AddJsonOptions(options => {
options.SerializerSettings.Error = (object sender, Newtonsoft.Json.Serialization.ErrorEventArgs args) =>
{
//Log args.ErrorContext.Error details...
};
});