Open hasithapg opened 4 years ago
Found the solution. Added below in my startup
services.AddControllers().AddNewtonsoftJson(options =>
{
options.SerializerSettings.ContractResolver = new DefaultContractResolver();
});
The default JSON serializer for ASP.NET Core 3.0 is changed to System.Text.Json. This doesn't fully compatible with NewtonSoft.Json de-serialized object return by the controller. So we need to add NewtonSoft default serializer settings.
Source/destination types
Source/destination JSON
Expected behavior
Actual behavior
Steps to reproduce
ConfigRepo
At this point when extract the properties of result it correctly shows the contents in JRaw field.
However, when passed through the controller its not.
This code used to work with .net core 2.2 getting content in Definition field.
But returns an empty array as the Definition when switched to .net core 3.0