Type | function |
Library | PLUGIN_NAME.* |
Return value | Table |
Keywords | json |
See also | PLUGIN_NAME.saveTable() |
This function loads a JSON file and returns a corresponding Lua table.
PLUGIN_NAME.loadTable( filename )
PLUGIN_NAME.loadTable( filename, baseDirectory )
String. The name of the file that will contain the JSON data.
Constant. Constant corresponding to the base directory where the file is located. Default value is system.DocumentsDirectory if the parameter is not provided.
local PLUGIN_NAME = require 'plugin.PLUGIN_NAME'
local colors = PLUGIN_NAME.loadTable( "colors.json" )