CSV to JSON Conversion
This skill converts CSV files into JSON records with inferred or declared schemas, and validates each row before emitting output.
Workflow
- Read the CSV header and sample the first 100 rows.
- Infer column types (string, integer, float, boolean, ISO date).
- Emit one JSON object per row; report rows that fail validation.
Example
python scripts/convert.py input.csv --schema references/schema-rules.md
Expected output shape:
{ "row": 1, "record": { "id": 42, "name": "example" }, "valid": true }
Verification
Run the fixtures under evals/ and verify each produced record matches the expected JSON in evals/expected.json. See references/schema-rules.md for the full inference table (sha256 pinned per release).
Deep reference
Type-inference edge cases and locale handling live in references/schema-rules.md — read it before changing inference behavior.