Dump.JSONTable
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | dump.JSONTable | |
| Function Description: | Dumps a table to a specified file in JSON format, ensuring proper serialization and directory creation. Handles nested tables, strings, numbers, and user data while skipping functions and userdata. Validates input and logs errors if necessary. | |
| File Location: | cmm.tools.lua | |
| Syntax: | CMM.dump.JSONTable( table TBL , string or nil FullPath ) | |
| Return Value: | nil | |
| Parameters: | Name | Description |
| TBL | Table to be serialized and written to a file. Must be a valid table structure with supported data types. | |
| FullPath | Full file path where the JSON file will be saved. If invalid or missing, defaults to CMM.dump.Directory. | |
| Example: | CMM.dump.JSONTable(CMM, "C:\test123\file.json") | |
| Example Description: | Demonstrates dumping the CMM table to a JSON file located at C:\test123\file.json, ensuring proper directory creation and formatted output. | |
| Related Functions: | ||
| Notes: | ||