The JSON value could not be converted to System.Int32

前端 未结 6 1840
南方客
南方客 2020-12-03 02:39

I want to send data of object to my Web API. The API accepts a parameter of class, which properties are type of int and string.

This is my class:

publi         


        
6条回答
  •  北海茫月
    2020-12-03 03:18

    There is an another way: just create a DTO with the type string for number types and convert it into the controller or to the type that you need.

提交回复
热议问题