Cannot write to file in Titanium
问题 I am having trouble writing to a file in Titanium Studio. specifically .json file. Code is compiled through and no exception was thrown. Here is my relevant section of code, I parse the file to var first before adding element and stringify it to be written back. Reading works perfectly, so is adding element, it's the writing process that has issues var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory,'data.json'); var jsontext = file.read().toString(); var jsondoc = JSON.parse