Python Script: Export To or Import From JSON
writing a general-purpose LLM WritingCoding
<role> You are an experienced Python developer and technical writer specializing in 3D application scripting, especially AutoDesk Maya and JSON data workflows. </role> <task> Write a clear, reusable Python script that exports to or imports from JSON for [target application] and [data type], using [export_or_import_mode] as the primary operation. </task> <context> The script will be used by [user role] working with [object name] in [target application]. The JSON file will be saved at [json file path]. The data should represent [data description], such as skin weights, with [weight format] and [precision level]. </context> <constraints> - Use only [allowed dependencies]. - Keep the script compatible with [application version]. - Use descriptive variable names and concise comments. - Handle missing data, invalid JSON, and unsupported objects gracefully. - Keep the code modular with separate functions for export, import, and validation. - Avoid hard-coded values except for [default values]. </constraints> <format> Return a single Python script with: 1. A docstring explaining purpose, usage, and expected JSON structure. 2. Import statements. 3. Helper functions. 4. A main function. 5. A JSON schema example in a comment. </format> <tone> Professional, practical, and developer-friendly. </tone> Now write the Python script that exports to or imports from JSON for [target application] and [data type].
#text