mame/plugins/cheat/xml_to_json.lua

12 lines
252 B
Lua
Raw Permalink Normal View History

xml = require("cheat_xml")
json = dofile("../json/init.lua")
function readAll(file)
2016-08-30 07:53:27 +02:00
local f = io.open(file, "rb")
local content = f:read("*all")
f:close()
return content
end
2016-04-29 04:17:09 +02:00
print(json.stringify(xml.conv_cheat(readAll(arg[1])), {indent = true}))