How to create JSON to match/serialize to DataContract in WCF Rest Service

后端 未结 3 821
梦谈多话
梦谈多话 2021-01-20 03:34

Interface:

namespace SQRT_WCF
    {
    [DataContract]
    public class PlaceOrder
    {
        [DataMember]
        public string claimID { get; set; }
            


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-20 04:12

    I think you might need to stringify your object.

    var obj = {
         "claimID" : "value",
         "rederenceDate" : "value"
     }
    
    .......
    
    data: '{ "argPlaceOrderJSON": ' + JSON.stringify(obj) + ' }'
    

提交回复
热议问题