.net服务端使用Newtonsoft.Json.dll组件输出json

使用Newtonsoft.Json.dll组件输出json:
var result = new
            {
                ResultCode = allDone == 0 ? -1 : 0,
                QueryUserInfoResp = getUserInfo(),
                WhoAddMeByPageResp = getWhoAddMeCount(),
                ISyncRecentTime = getSyncTime(iContactServiceBLL.FROM_FORUM),
                SyncTime12580 = getSyncTime(iContactServiceBLL.FROM_12580)
            };
            JsonSerializer js = new JsonSerializer();
            js.Serialize(new JsonTextWriter(context.Response.Output), result);
原文地址:https://www.cnblogs.com/ylemzhang/p/2132181.html