Avoid having to deal with circular references when outputting json.

This commit is contained in:
André Cruz
2013-05-24 00:58:43 +01:00
parent d8719ede12
commit ecacdfaf49
4 changed files with 26 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
var circularJson = require('circular-json');
// TODO: take care of trailing ,
function renderHead() {
return '[';
@@ -27,7 +27,7 @@ function uncolor(str) {
}
function stringify(data) {
return uncolor(circularJson.stringify(data, null, ' '));
return uncolor(JSON.stringify(data, null, ' '));
}
// -------------------------