local jsonString = json.encode(tableToEncode) function saveToFile(path, data) local filepath = system.pathForFile( path, system.DocumentsDirectory ) local file = io.open( filepath, "w" ) file:write(data) io.close( file ) file = nil end saveToFile("map.json", jsonString)
Above is the code that I have written in order to write the json data to a file.
I have tried printing to see if the file is being written. Corona says that it is being written.
The only things I can think of are that it is being written to the wrong directory, or I’m doing something just completely wrong.
Any information would be appreciated 