关于JSON与C# WEBSERVICE的问题

前段JSON如下 :

      function newAffair() {
            $.ajax({
                type: "post",
                url: "http://localhost/Sky.SftoaMobileWS/SftoaMobileWebService.asmx/newAffair",
                data: {'uid':'0ca311cc-31dd-4aef-8db5-f73d798e3c56','type':'2', 'content': { 'dealuser':'1','memo':'test','begindate':'2015-09-10','begintime':'1','enddate':'2015-09-11','endtime':'1'}, 'attachments': [{aid:'1',aname:'a1'}] },
                dataType: 'json',
                contentType: 'application/json;charset=utf-8',
                success: function(data) {

                },
                error: function(msg) {
alert(msg)
                }
            });
        }
    C#WEBSERVICE写法如下 :
       /// <summary>
        /// 新申请事务
        /// </summary>
        /// <returns></returns>
        [WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = false)]
        public object newAffair(object uid, object type, object content, object attachments)
        {}
            可是在调试的时候,会发现无法进入WEBSERVICE的newAffair方法,请问 我该如何更改我的写法,谢谢。

data要为json字符串,你这样传递会被转为键值对会出错

 data: "{'uid':'0ca311cc-31dd-4aef-8db5-f73d798e3c56','type':'2', 'content': { 'dealuser':'1','memo':'test','begindate':'2015-09-10','begintime':'1','enddate':'2015-09-11','endtime':'1'}, 'attachments': [{aid:'1',aname:'a1'}] }"

jQuery调用WebService返回JSON数据