Hello guys,
I really wonder why Seam2 automatically putting double quote on arrayJSON(bold below application.js) inside JSON-value-pair(bold below home.xhtml).
Could there be a way to escape this one? Those double quotes outside, because it's making arrayJSON a string but not array.
filename: application.js
fileControls = {};
fileControls.downloadFile = function (el) {
transferSpec = {
"paths": [ { "source" : "tinyfile0001" } ]
};
document.getElementById('transfer_spec').innerHTML=JSON.stringify(transferSpec,null," ");
};
displaying: home.xhtml
{
"paths": "[ { \"source\":\"tinyfile0001\" } ]"
}
-Thanks.