Documents

Convert CSV to JSON

Parses CSV into an array of objects (or arrays with header=false). Real RFC 4180 support: quoted fields can contain commas and newlines.

Costs 1 credit per call.

post/csv-to-json

Request

  • Base URL: https://api.cofferdock.com
  • URL: https://api.cofferdock.com/csv-to-json
  • Auth: API key in header x-api-key

Request body

csvstring required

The CSV text to convert, up to 5 MB. Quoted fields may contain commas and line breaks. All values come back as strings.

headerboolean

true (default) = the first row holds the column names, so each row becomes an object; false = each row becomes an array of values.

delimiterstring

Field separator, exactly one character: "," (default), ";", "|" or a tab. Any other value is ignored and "," is used.

output'json' | 'raw'

How to return the result: "json" (default: the rows in a "data" field of the JSON response) or "raw" (just the JSON array of rows as the response body).

Response

Result.

successboolean

Changes

No recorded changes to this operation across all 1 revision of this API.