Npm circular-json

Jmnote bot (토론 | 기여)님의 2020년 11월 2일 (월) 02:54 판 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

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 }}