Npm circular-json

1 개요[ | ]

npm circular-json
CircularJSON.stringify()
  • JSON을 문자열로 변환할 때 순환참조 오류를 차단할 수 있음

2 설치[ | ]

root@zetawiki:~/test# npm install circular-json
circular-json@0.3.1 node_modules/circular-json

3 사용예시[ | ]

root@zetawiki:~/test# cat test.js 
var CircularJSON = require('circular-json');
var obj = {};
obj.child = obj;
console.log( CircularJSON.stringify( obj ) );
root@zetawiki:~/test# node test.js 
{"child":"~"}

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}