HI WELCOME TO KANSIRIS

The JSON value could not be converted to System.Nullable

Leave a Comment

 Microsoft has removed Json.NET dependency from ASP.NET Core 3.0 onwards and using System.Text.Json namespace now for serialization, deserialization and more.

You can still configure your application to use Newtonsoft.Json. For this -

  1. Install Microsoft.AspNetCore.Mvc.NewtonsoftJson NuGet package

  2. In ConfigureServices() add a call to AddNewtonsoftJson()-

    services.AddControllers().AddNewtonsoftJson();

Read more on https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-apis/

https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.