Hi,
On the click of a button, I am saving the content (json) to a file. The problem I am facing is that the file has whitespaces stripped out.
saveContent : function () {
var format = "data:application/json";
var fileName = "content.json";
var dataURI = format + "," + this.content;
kendo.saveAs(
{
dataURI: dataURI,
fileName: fileName
}
);
}
For e.g. if the json is something like this
{"productDescription" : "Bag of wheat 15 kilogram"}
the content of file is the following. How can I make sure that saved file has whitespaces preserved?
{"productDescription" : "Bagofwheat15kilogram"}