Save and load json files

Hello everyone
i read this tutorial http://blog.anscamobile.com/2011/08/tutorial-exploring-json-usage-in-corona/ and cant figure out how to save and load json file

for example: i have a table with some data and i need to save it to json file upon exiting my app and then load when app starts
how can i do that?

thanks in advance [import]uid: 16142 topic_id: 13548 reply_id: 313548[/import]

See:

http://developer.anscamobile.com/reference/index/ioopen

us the io.* API calls to open, read, write and close files. The above link has examples of what to do. After you json.encode a table, you end up with a string that can be easily written to a file. Then when you open the file, read that string back in, json.decode will return a table of your data.

[import]uid: 19626 topic_id: 13548 reply_id: 49773[/import]