手动模拟输出json

每次去写太麻烦,写一个样本,下次对照就好了

            context.Response.Write
("{\"UserName\":\""+HttpContext.Current.User.Identity.Name+"\","+"\"SessionID\":\""+context.Request.Cookies["ASP.NET_SessionId"].Value+"\"}");//输出模拟json对象

 

你可能感兴趣的:(json)