Newtonsoft.Json.SerializeObject 转换参数

 

 

var model_JsonSerializerSettings = new JsonSerializerSettings()
            {
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore,       //
                DateFormatString = "yyyy-MM-dd HH:mm:ss"    //输出时间格式
                //其他以后补充
            };
            return JsonConvert.SerializeObject(r, Formatting.Indented, model_JsonSerializerSettings);

 

posted @ 2017-07-06 10:11  鞍山老菜鸟  阅读(1543)  评论(0)    收藏  举报