|
function doOutput(table)
|
|
local file = io.open("map.json", "w")
|
|
io.output(file)
|
|
io.write(json.encode(table))
|
|
io.close(file)
|
|
end
|
|
|
|
function getInput(filename)
|
|
local file = io.open(filename, "r")
|
|
io.input(file)
|
|
local content = io.read()
|
|
io.close(file)
|
|
return content
|
|
end
|