62,074
社区成员
发帖
与我相关
我的任务
分享
[HttpPost]
public HttpResponseMessage Post([FromBody]string str)
{
ReturnNode a = new ReturnNode();
a.Code = "1111";
return this.seria(a);
}
private HttpResponseMessage seria(ReturnNode aa)
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
string str = serializer.Serialize(aa);
return new HttpResponseMessage { Content = new StringContent(str, Encoding.UTF8, "application/json") };
}
[/quote]
会不会是电脑少装了什么东西 [HttpPost]
public HttpResponseMessage Post([FromBody]string str)
{
ReturnNode a = new ReturnNode();
a.Code = "1111";
return this.seria(a);
}
private HttpResponseMessage seria(ReturnNode aa)
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
string str = serializer.Serialize(aa);
return new HttpResponseMessage { Content = new StringContent(str, Encoding.UTF8, "application/json") };
}
[/quote]
方法在楼上 [HttpPost]
public HttpResponseMessage Post([FromBody]string str)
{
ReturnNode a = new ReturnNode();
a.Code = "1111";
return this.seria(a);
}
private HttpResponseMessage seria(ReturnNode aa)
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
string str = serializer.Serialize(aa);
return new HttpResponseMessage { Content = new StringContent(str, Encoding.UTF8, "application/json") };
}