代码报错 Uncaught TypeError: Converting circular structure to JSON
报错内容
Uncaught TypeError: Converting circular structure to JSON--> starting at object with constructor 'Object'--- property 'obj' closes the circleat JSON.stringify (<anonymous>)at <anonymous>:1:17
报错原因
使用 JSON.stringify
转换循环引用的 Object.
解决方式
方式1: 数据处理时注意不要重复引用, 或者处理数据时使用深拷贝进行赋值,防止重复引用。
方式2:
使用其他方式进行深拷贝;
例如: ...
、Object.assign
几种深拷贝的区别, 注意JONS.stringify
代码报错 Uncaught TypeError: Converting circular structure to JSON相关推荐
- Uncaught TypeError: Converting circular structure to JSON
这个错误发生在使用 JSON.stringify() 方法将具有循环引用的对象转换为 JSON 时出现.循环引用是指一个对象引用它自己,或者两个或多个对象以循环方式相互引用.就比如以下代码: let ...
- vue 路由里关于 TypeError: Converting circular structure to JSON 报错问题
首先放上报错内容 TypeError: Converting circular structure to JSON –> starting at object with constructor ...
- TypeError: Converting circular structure to JSON
报错: [Vue warn]: Error in nextTick: "TypeError: Converting circular structure to JSON--> star ...
- 解决TypeError: Converting circular structure to JSON
var cache = [];var aa = JSON.stringify(rowData, function(key, value) {if (typeof value === 'object' ...
- WEEX 报错 TypeError: Converting circular structor to JSON 的解决方法
背景 在进行千牛QAP插件开发的时候,有时会遇到 TypeError: Converting circular structor to JSON,并且看不到报错位置,对新手可能会造成疑惑. 原因 we ...
- js代码中for循环里绑定onclick事件报错Uncaught TypeError Cannot set properties of undefined (setting ‘className‘)
jsfor循环里绑定onclick事件报错Uncaught TypeError Cannot set properties of undefined (setting 'className') 我想要 ...
- 立即执行函数报错Uncaught TypeError: (intermediate value) is not a function.
立即执行函数报错Uncaught TypeError: (intermediate value) is not a function. 文章目录 立即执行函数报错Uncaught TypeError: ...
- 小程序组件报错Uncaught TypeError: Cannot read property 'name' of undefined
小程序组件报错Uncaught TypeError: Cannot read property 'name' of undefined Component({/*** 组件的属性列表*/propert ...
- 【解决】控制台报错Uncaught TypeError: Object(...) is not a function at eval (vue-router.esm-bundler.js
打开http://localhost:8080/,控制台报错 Uncaught TypeError: Object(...) is not a functionat eval (vue-router. ...
最新文章
- android不公开的面试题偶!!!
- MyBatis中使用#{}和${}的区别
- c51语言if语句多条件使用,单片机if语句判断多个条件
- 如何使用Meter-WebSocketSampler
- mysql长事务慢查询解决方案_MySQL : 如何监控和处理慢查询与长事务 ?
- 通过mysqldump备份数据库
- 利用linux的mtrace命令定位内存泄露(Memory Leak)
- C# WCF快速开发框架 | 原创作品
- 拓端tecdat|R语言关联规则模型(Apriori算法)挖掘杂货店的交易数据与交互可视化
- sun键盘没有stop键_【转帖】SUN基础知识
- linux 安装pgadmin4
- 台式计算机声音输出方式在哪里,电脑声音无法找到输出设备怎么办?
- 12.PS-渐变工具组
- cavans制作水印 html
- 读取pdf文字和excel写入操作
- esxi导出ovf报错
- [C语言]扫雷游戏(Mine Sweeper)
- puzzle(1024)帐篷、星之战
- 本田思域自动挡挡位图解,思域换挡操作技巧
- 在创建jsp页面之后保存时提示错误,并提示以UTF-8格式进行保存。