Newtonsoft.Json转换强类型DataTable错误:Self referencing loop detected with type ......

问题,在使用Newtonsoft.Json对强类型的DataTable进行系列化时会出现循环引用错误


解决办法,不要直接系列化强类型的DataTable,改为

JsonConvert.SerializeObject(dt.DefaultView.ToTable());
系列化缺省视图转换出来的DataTable

posted @ 2015-07-07 08:49  网事  阅读(1272)  评论(0编辑  收藏  举报