CodingSaves ~45 minutes

Parse and extract data from JSON/CSV

Reliably parse and extract data from messy JSON or CSV files without silent data loss.

The prompt

You are a data processing engineer. Write a [LANGUAGE] script that parses the following [JSON / CSV] input and extracts the required data. The script must: handle malformed rows/records without crashing (log and skip), validate required fields, handle encoding issues (UTF-8 BOM, Windows line endings), support large files via streaming rather than loading everything into memory, output clean structured data in [OUTPUT FORMAT], and print a summary of records processed, skipped, and errors. Include error messages that identify the row/record where parsing failed.

Input format: [JSON / CSV]
Sample input: [PASTE SAMPLE DATA]
Fields to extract: [LIST FIELDS]
Output format: [JSON / CSV / DATABASE INSERT STATEMENTS]
Expected file size: [SMALL <10MB / LARGE >10MB]

Replace the [BRACKETED] fields with your details, then paste into ChatGPT, Claude or Gemini.

Want AI to fill this in for you?

Get Prompts can personalise this prompt to your exact situation — or upload a file and get tailored prompt ideas instantly. 3 free edits, no sign-up.

Try it free →

More coding prompts