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

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

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

Newtonsoft.Json转换强类型DataTable错误:Self referencing loop detected with type ......的更多相关文章

  1. c# json 序列化时遇到错误 error Self referencing loop detected for type

    参考网址:http://blog.csdn.net/adenfeng/article/details/41622255 在写redis缓存帮助类的时候遇到的这个问题,本来打算先序列化一个实体为json ...

  2. Self referencing loop detected with type

    json.net namespace EFDAL{    using System;    using System.Collections.Generic;    using Newtonsoft. ...

  3. .NET JSON 转换 Error ” Self referencing loop detected for type“

    在进行实体转换为Json格式报错如下图: Self referencing loop detected for property 'md_agent' with type 'System.Data.E ...

  4. JSON.NET的Self referencing loop detected with type的原因以及解决办法

    模型中有循环引用是很常见的.例如,以下模型显示双向导航属性: : public class Category : { : public Category() : { : Products = new ...

  5. EF关于报错Self referencing loop detected with type的原因以及解决办法

    1)具体报错 { "Message": "出现错误.", "ExceptionMessage": "“ObjectContent` ...

  6. Self referencing loop detected for property 错误

    EF 序列化返回json时 报错:Self referencing loop detected for property 解决方案:在webapiconfig.cs文件中,增加设置: 1.config ...

  7. codefirst mvc Self referencing loop detected for property

    登录时,json序列化用户类时提示错误"Self referencing loop detected for property--",经过5个小时的查找,发现原因可能是,用户类包含 ...

  8. 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 ...

  9. Newtonsoft.Json 转换DateTime类型为字符串时,串内部会有一个T。解决方案

    使用Newtonsoft.Json 转换DateTime类型时,若使用标准转换,则字符串内会有一个T(虽然再转换成DateTime没有问题). 若要转换成DateTime没有T,可以加上特性: pub ...

随机推荐

  1. 对于 url encode decode js 和 c# 有差异

    在js对一个值进行解码使用:decodeURIComponent,编码使用:encodeURIComponent

  2. django 与 mysql 勾结指南

  3. 物联网架构成长之路(25)-Docker构建项目用到的镜像1

    0. 前言 现在项目处于初级阶段,按照规划,先构建几个以后可能会用到的Image,并上传到阿里云的Docker仓库.以后博客中用到的Image,大部分都会用到这几个基础的Image,构建一个简单的物联 ...

  4. ubuntu 18.04 配置 rc.local

    ubuntu 18.04 配置 rc.local:https://blog.csdn.net/a912952381/article/details/81205095 Ubuntu /etc/rc.lo ...

  5. 试试SQLServer 2014的内存优化表

    SQL Server2014存储引擎:行存储引擎,列存储引擎,内存引擎 SQL Server 2014中的内存引擎(代号为Hekaton)将OLTP提升到了新的高度. 现在,存储引擎已整合进当前的数据 ...

  6. 【Spark深入学习 -16】官网学习SparkSQL

    ----本节内容-------1.概览        1.1 Spark SQL        1.2 DatSets和DataFrame2.动手干活        2.1 契入点:SparkSess ...

  7. curl模拟访问已经存在的cookie

    curl 'http://i.meituan.com/brunch/order?status=2' -H 'Pragma: no-cache' -H 'Accept-Encoding: gzip, d ...

  8. ffmpeg中AVBuffer的实现分析

    [时间:2017-10] [状态:Open] [关键词:ffmpeg,avutil,avbuffer, 引用计数] 0 引言 AVBuffer是ffmpeg提供的基于引用计数的智能指针的一个实现版本. ...

  9. Win10连接远程桌面的时候提示您的凭证不工作该怎么办?

    Win10连接远程桌面的时候提示您的凭证不工作该怎么办?Win10连接远程桌面的时候,提示“您的凭证不工作”.原有保存的远程帐号密码无法使用,导致远程登录系统失败.我这里总结下自己解决的方法,分享给大 ...

  10. windows环境下redis启动加到服务中

    前置条件: 1.命令运行在redis-server.exe目录下  2.cmd命令  安装命令: redis-server.exe --service-install redis.windows.co ...