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 ...
随机推荐
- markdownpad目录格式配置
表格语法 | Tables | Are | Cool | | ------------- |:-------------:| -----:| | col 3 is | right-aligned | ...
- R文本挖掘之jiebaR包
library(jiebaRD)library(jiebaR) ##调入分词的库cutter <- worker()mydata =read.csv(file.choose(),fileEnc ...
- TensorFlow精选Github开源项目
转载于:http://www.matools.com/blog/1801988 TensorFlow源码 https://github.com/tensorflow/tensorflow 基于Tens ...
- webview调起浏览器
调起浏览器 url = "intent://" + url +"#Intent;scheme=http;action=android.intent.action.VIEW ...
- Cocos 更新时反复杀进程,导致差异更新失效的Bug
Cocos 更新时反复杀进程时,差异更新失效的问题: 问题复现步骤: 1.在project.manifest.temp 文件下载成功后,下载Assets资源的时候杀掉进程 2.重启游戏,继续更新时会使 ...
- xml序列化与反序列化工具
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.I ...
- 微信redirect_uri域名与后台配置不一致,错误代码10003
现象 做好了微信公众号扫描登录后,很稳定的运行,后来增加了微信开放平台,结果偶尔就出现了这个redirect_uri错误.然后重启服务器后,又正常. 探查 网上的说法都是网页授权配置的问题,检查微信公 ...
- Linux 设备树属性在驱动中获取方法
获取设备树中的属性,可以直接当设备树为配置文件,方便,快捷. 一般probe之后,调用的 probe函数的参数, 是一个设备结构体. 拿 spi 为例子 static int wk2xxx_probe ...
- C# 多线程中经常访问同一资源可能造成什么问题?
竞态条件和死锁. 如果两个或多个线程访问相同的对象,或者访问不同步的共享状态 ,就会出现竞态条件: 为了避免出现该问题,可以锁定共享的对象.但是过多的锁定也会有麻烦,那就是死锁: 当至少有两个线程被挂 ...
- linux中,当执行rpm -e删除一个软件包时,都做了些什么事
问题描述: 今天在通过rpm进行删除软件包时,出现了问题,就引发了我对于rpm包执行删除动作时的一些行为做了思考,之前找了很多的文章,后来想如果有debug日志信息,那么不就都清楚了吗 通过打印rpm ...