Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.26 KB

loadTable.markdown

File metadata and controls

35 lines (22 loc) · 1.26 KB

PLUGIN_NAME.loadTable()

 
Type function
Library PLUGIN_NAME.*
Return value Table
Keywords json
See also PLUGIN_NAME.saveTable()

Overview

This function loads a JSON file and returns a corresponding Lua table.

Syntax

PLUGIN_NAME.loadTable( filename )
PLUGIN_NAME.loadTable( filename, baseDirectory )
filename (required)

String. The name of the file that will contain the JSON data.

baseDirectory (optional)

Constant. Constant corresponding to the base directory where the file is located. Default value is system.DocumentsDirectory if the parameter is not provided.

Examples

local PLUGIN_NAME = require 'plugin.PLUGIN_NAME'

local colors = PLUGIN_NAME.loadTable( "colors.json" )