Convert comma-separated CSV text into structured JSON arrays and API payload objects with clean indentation.