When converting RFC 8259 JSON payloads into tabular text following RFC 4180 CSV conventions, the converter extracts top-level keys from your input object or array of objects to construct column headers. Primitive values such as strings, numbers, and booleans are written directly to their corresponding cells, while null values output as empty cells.
For example, given this JSON input:
[
{"id": 1, "name": "Alice", "roles": ["admin", "editor"], "deletedAt": null}
]
With headers enabled and a comma delimiter, the generated CSV output is:
id,name,roles,deletedAt
1,Alice,"[""admin"",""editor""]",
Notice that roles remains a valid JSON array serialized inside double quotes (with internal quotes escaped as "" per RFC 4180) rather than outputting [object Object] or splitting unpredictably into roles_0 and roles_1 columns.