mame/plugins/cheat/xml_to_json.lua
2017-06-02 18:03:25 -05:00

11 lines
252 B
Lua

xml = require("cheat_xml")
json = dofile("../json/init.lua")
function readAll(file)
local f = io.open(file, "rb")
local content = f:read("*all")
f:close()
return content
end
print(json.stringify(xml.conv_cheat(readAll(arg[1])), {indent = true}))