我有此错误 无法将类型\ u0027System.String \ u0027的目的是输入\ u0027System.Collections.Generic.Dictionary 2[System.String,System.Int32]\u0027","StackTrace":" at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToType(Object o, Type type, JavaScriptSerializer serializer)\r\n at System.Web.Script.Services.WebServiceMethodData.StrongTypeParameters(IDictionary
2 rawParams个)\ r \ n在System.Web程序。 Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target,IDictionary 2 parameters)\r\n at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary
2 rawParams)\ r \ n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context,WebServiceMethodData methodData)“,”ExceptionType“:”System.InvalidOperationException通对象的WebMethod与字典<string, int>放慢参数
当我传递数组到WebMethod与字典
你想通过字典对象在webmehtod/webapi项目的参数? –
Rusty
2013-02-22 11:38:46
没有我让forloop在forloop中创建新的对象来推它在数组中,并使JSON.stringify(数组),但得到相同的错误 – eman 2013-02-22 12:00:47