Newtonsoft.Json转换强类型DataTable错误:Self referencing loop detected with type ......
问题,在使用Newtonsoft.Json对强类型的DataTable进行系列化时会出现循环引用错误
解决办法,不要直接系列化强类型的DataTable,改为
JsonConvert.SerializeObject(dt.DefaultView.ToTable());
系列化缺省视图转换出来的DataTable
Newtonsoft.Json转换强类型DataTable错误:Self referencing loop detected with type ......的更多相关文章
- c# json 序列化时遇到错误 error Self referencing loop detected for type
参考网址:http://blog.csdn.net/adenfeng/article/details/41622255 在写redis缓存帮助类的时候遇到的这个问题,本来打算先序列化一个实体为json ...
- Self referencing loop detected with type
json.net namespace EFDAL{ using System; using System.Collections.Generic; using Newtonsoft. ...
- .NET JSON 转换 Error ” Self referencing loop detected for type“
在进行实体转换为Json格式报错如下图: Self referencing loop detected for property 'md_agent' with type 'System.Data.E ...
- JSON.NET的Self referencing loop detected with type的原因以及解决办法
模型中有循环引用是很常见的.例如,以下模型显示双向导航属性: : public class Category : { : public Category() : { : Products = new ...
- EF关于报错Self referencing loop detected with type的原因以及解决办法
1)具体报错 { "Message": "出现错误.", "ExceptionMessage": "“ObjectContent` ...
- Self referencing loop detected for property 错误
EF 序列化返回json时 报错:Self referencing loop detected for property 解决方案:在webapiconfig.cs文件中,增加设置: 1.config ...
- codefirst mvc Self referencing loop detected for property
登录时,json序列化用户类时提示错误"Self referencing loop detected for property--",经过5个小时的查找,发现原因可能是,用户类包含 ...
- Request failed with status code 500以及自引用循环Self referencing loop detected for property ‘xx‘ with type
错误Error: Request failed with status code 500 ,调试前端没问题,后端也没问题,还报错"连接超时" 在Network中找到错误Self r ...
- Newtonsoft.Json 转换DateTime类型为字符串时,串内部会有一个T。解决方案
使用Newtonsoft.Json 转换DateTime类型时,若使用标准转换,则字符串内会有一个T(虽然再转换成DateTime没有问题). 若要转换成DateTime没有T,可以加上特性: pub ...
随机推荐
- SpringBoot项目接口第一次访问慢的问题
SpringBoot的接口第一次访问都很慢,通过日志可以发现,dispatcherServlet不是一开始就加载的,有访问才开始加载的,即懒加载. 2019-01-25 15:23:46.264 IN ...
- ORACLE 从一个实例迁移到另外一个实例实战记录
.schema1到schema2的迁移 Oracle 从一个用户expdp导出再impdp导入到还有一个用户,能够使用REMAP_SCHEMA=user1:user2来实现: 假设想导入的用户已经存在 ...
- CAS集成oauth2协议的支持
参考https://blog.csdn.net/qq_34021712/article/details/82290876, 在springboot体系类,可以采用spring security oau ...
- OpenWrt 对外网开放vsftp服务和samba服务
对WAN开放vsFTP OpenWrt默认启动了vsftp服务, 在Luci上没找到配置界面, 但是后台是有这个服务的, 如果在Openwrt的lan下, 可以直接使用FileZilla之类的客户端连 ...
- MATLAB 程序计算结果出现 复数(a+bi)问题
存在对负数开根号的情况了: >> (0.777)^0.1 ans = 0.9751 >> ( ans = 0.6037 >> (0.777)^2.1 ans = 0 ...
- MySQL 8 中新的复制功能
MySQL 8 中新的复制功能使得操作更加方便,并帮助用户更好地观察复制过程中内部发生的情况. 使用 MySQL 5.7.17 获取 MySQL 组复制插件是一项巨大的工作.组复制是一个新的插件,通过 ...
- Linux下通过server-status监控性能
Linux下通过server-status监控性能 前提:安装好Apache,在opt/路径下 查看Apache的工作模式 可以知道是 prefork.c模式 配置server-status 性能 进 ...
- [lvs]lvs的三种模式
回顾了下lvs的三种模式的调度机制 1.lvs的dr模式中的arp的抑制,eth用自己口arp回应. 2.keepalive是否直接操作rs? 不直接操作, 只操作dr(配lvs) 3.tunnel模 ...
- Base标签小记:更改当前页面的地址
一般来说,H5游戏的部署,index.html和代码资源都会放在同一个地址下然后使用iFrame导入到需要加载游戏的页面即可. 但是今天游戏项目部署遇到了一个问题,游戏自己的访问页面(index.ht ...
- 如何保持github的fork于主干同步
step1: https://help.github.com/articles/configuring-a-remote-for-a-fork/ step2: https://help.github. ...