Merge pull request #662 from picklesrus/develop-fix-json

Fix #643 to make exported json valid
This commit is contained in:
Rachel Fenichel
2016-10-04 11:28:57 -07:00
committed by GitHub

View File

@@ -113,6 +113,11 @@ BlockExporterTools.prototype.getBlockDefinitions =
}
blockCode.push(code);
}
// Surround json with [] and comma separate items.
if (definitionFormat == "JSON") {
return "[" + blockCode.join(",\n") + "]";
}
return blockCode.join("\n\n");
};