返回json

private void WriteJson(object o)
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
Context.Response.ContentType = "text/json";
string str = serializer.Serialize(o);
logger.Info(" 结果: " + str);
Context.Response.Write(str);
Context.Response.End();
}

posted @ 2017-06-06 14:51  我的女人是捡的  阅读(150)  评论(0编辑  收藏  举报