説明
The object-free ExportJson Lua function exports a Lua table in JSON format.
|
既知の制限:
|
The JSON file might not be formatted in proper JSON format.
|
引数
- filename:
This is a string containing the file name of the exported file. It should contain the file name, including the entire path. See the example below.
- export_data:
This is the data that is going to be exported. It should be a table object.
戻り値
- boolean:
This function returns a boolean.
- true:
The export was a success.
- false:
The export failed.
例
To export the build details table, create a plugin with this code:
|
return function() local build = BuildDetails() local exportPath = GetPath(Enums.PathType.Library) .. "/BuildDetails.json" local success = ExportJson(exportPath, build) if success then Printf("The export was stored at: " .. exportPath) else Printf("The export failed.") end end |