Code: Select all
jupiter = require "jupiter"
data = {_fileName = "example.txt", "Save this string!"}
success = jupiter.save(data)
newData = jupiter.load("filename.extension")
Jupiter is capable of handling nested tables to the nth degree, so it will serialise and write your tables to a file for you. To keep things simple Jupiter handles filenames of loaded files for you. However, if you are writing a new file you must include the table property _fileName in the lowest level of your table:example.txt wrote: 1=Save this string
Code: Select all
tableToSave = {_fileName = "example.txt", someVar = 7}
Full documentation and the script itself can be found on github:some.file wrote: index.subIndex.nIndex=value
https://github.com/Lafolie/Jupiter
Have fun saving your data.