How to fix "The JSON value could not be converted to Northwind_def.DTO.OrdersDTO. Path: $.customer.orders[0] | LineNumber: 28 | BytePositionInLine: 14."

Howtobepier 0 Reputation points
2023-07-19T08:50:32.87+00:00

ho questo tipo di problema e non riesco a mappare il mio DTO con il JSON value

"The JSON value could not be converted to Northwind_def.DTO.OrdersDTO. Path: $.customer.orders[0] | LineNumber: 28 | BytePositionInLine: 14."   

come potrei risolverlo?

Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,926 Reputation points Volunteer Moderator
    2023-07-19T15:58:53.4333333+00:00

    the error states the json can not be deserialized to a OrdersDTO. show us the json.

    note: it is poor design to use DTO entities as view models.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.