Skip to main content

active is not a CSV header

CSV keeps top-level keys only. Nested meta stays one cell of JSON text. active is not its own column.

Updated 1 min readMarkdown
active is not a CSV header

On the JSON converter, CSV keeps top-level keys only. A nested object becomes one cell of JSON text, not extra columns. Inner quotes are doubled so the row stays valid CSV.

When meta holds {"active":true}, the header is meta. active is not a header.

id,name,role,meta
1,Ada,engineer,"{""active"":true}"

Same nest, other drafts

Laravel nests a PHP array. TypeScript emits interface Meta. The PHP DTO types meta as array with no child class. Conversion stays in the browser.

Not the empty-array case

[] is valid JSON, but CSV rejects it with CSV conversion expects an array of objects. That is a different limit from a nested object on a real row.

Guide: https://kepttools.com/guides/json-to-typescript-php-dto-laravel

No comments yet. Be the first to comment.