Help Needed - Upgrade issue

Hi i’ve had to update our payments AWS lambda from Dot Net Core 2.1 to 3.1
And payments have stopped working.
im getting : Deserialization of reference types without parameterless constructor is not supported. Type ‘Square.Models.CreatePaymentRequest’
I was using version 4.0.0 the first version of the sdk which was worked fine. Ive just updated to 9.1 but still get the errors.

[HttpPost]
public async Task IndexAsync([FromBody] Square.Models.CreatePaymentRequest payment)
{

My method will no longer accept Square.Models.CreatePaymentRequest I just get that error “Deserialization of reference types without parameterless constructor is not supported. Type ‘Square.Models.CreatePaymentRequest’”

Any ideas?

Hi I have now sorted this by adding NuGet reference to Microsoft.AspNetCore.Mvc.NewtonsoftJson
and then : ```
services.AddControllers()
.AddNewtonsoftJson();

:slight_smile:

Glad to hear you figured it out! :slightly_smiling_face: