obj 转为Json 时间格式自定义

   var tb = evnWarningBll.GatWarning();
            var  timeFormat = new IsoDateTimeConverter();
            timeFormat.DateTimeFormat = "yyyy-MM-dd HH:mm:ss";
            _context.Response.Write(JsonResultHelper.JsonResult(true, "查询成功!", JsonConvert.SerializeObject(tb, Newtonsoft.Json.Formatting.Indented, timeFormat)));

posted @ 2016-07-12 22:45  change_4_now  阅读(208)  评论(0编辑  收藏  举报