Skip to content
Snippets Groups Projects
Commit 2c19b398 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

add quotes back to saved json

parent 70b5ca46
Branches
No related tags found
No related merge requests found
......@@ -10,8 +10,8 @@ define(['underscore', 'fileSaverLib', 'lattice', 'materials', 'ribbon', 'menuWra
// console.log(data.toString());
var jsonString = JSON.stringify(data, null, '\t');
if (data.assembler){
jsonString.replace(/\\"/g,"\uFFFF"); //U+ FFFF
jsonString = jsonString.replace(/\"([^"]+)\":/g,"$1:").replace(/\uFFFF/g,"\\\"");
// jsonString.replace(/\\"/g,"\uFFFF"); //U+ FFFF
// jsonString = jsonString.replace(/\"([^"]+)\":/g,"$1:").replace(/\uFFFF/g,"\\\"");
}
var blob = new Blob([jsonString], {type: "text/plain;charset=utf-8"});
saveAs(blob, name + extension);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment