【发布时间】:2017-04-10 22:59:03
【问题描述】:
基本上我想将 .json 文件转换为 Lua 表,我正在使用这个 tutorial(可能已过期),但出现以下错误:
attempt to call global 'jsonFile' (a nil value)
menu.lua
local json = require ("json")
local tableJson = json.decode( jsonFile("teste.json") )
teste.json
{
"name": "Jack (\"Bee\") Nimble",
"format": {
"shape": "rect",
"width": 1920,
"height": 1080,
"interlace": false,
"framerate": 24
}
}
我在官方 API 参考上查找了“jsonFile”,但那里什么都没有,我也没有找到任何方法。
提前感谢您的帮助!
【问题讨论】: