POST /v1/json-to-csvConvert JSON array to CSV
Format Utils lf-format-utils
Turns a set of labelled records into spreadsheet rows. Converts a JSON array of objects to CSV format. Object keys become column headers.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
json | string | No | JSON array string |
Response Schema
success (boolean): Operation success
csv (string): CSV output
rows (integer): Row count
columns (array): Column headers
cURL Example
curl -X POST 'https://lf-format-utils.laminarforge.dev/v1/json-to-csv' -H 'Authorization: Bearer lf_YourApiKey' -H 'Content-Type: application/json' -d '[{"name":"Alice","age":30}]'Python Example
import requests
url = 'https://lf-format-utils.laminarforge.dev/v1/json-to-csv'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
data = [{'name': 'Alice', 'age': 30}]
response = requests.post(url, headers=headers, json=data)
print(response.json())