1、 安装插件包:
npm install -S circular-json
2、 在项目中引用:
import CircularJSON from 'circular-json'
3、JSON格式转化:
let menuNode = CircularJSON.stringify(copyNode)
let nodeData = CircularJSON.parse(menuNode )
1、 安装插件包:
npm install -S circular-json
2、 在项目中引用:
import CircularJSON from 'circular-json'
3、JSON格式转化:
let menuNode = CircularJSON.stringify(copyNode)
let nodeData = CircularJSON.parse(menuNode )
本文标题:使用circular-json进行JSON转换
本文链接:https://www.haomeiwen.com/subject/epmfrdtx.html
网友评论