jsonnorm / convert API response to CSV

Technical guide · wrappers + ragged records

Convert API response data without trusting the first record.

Production responses are wrapped, paginated, ragged, and full of identifiers that look like numbers. Separate the row payload deliberately, then audit the union schema before exporting.

The difficult example: a wrapper and a late field

The response envelope has pagination metadata, while the third row adds country and an explicit null. Extract the row array in your API pipeline, then give that array to the converter; the converter never fetches an arbitrary URL; paste or upload the JSON instead.

API response shape

{
  "data": [
    { "id": 1, "city": "Paris" },
    { "id": 2, "city": "London", "zip": "SW1A" },
    { "id": 9007199254740993, "city": null, "country": "FR" }
  ],
  "meta": { "next": "/users?page=2" }
}

Resulting CSV (data array)

id,city,zip,country
1,Paris,,
2,London,SW1A,
9007199254740993,,,FR

jsonnorm doesn't fetch URLs. Fetch the response with your authenticated API client, then paste or upload the JSON.

Checks for API exports

  • Union completeness: zip and country survive even though no record has every key.
  • Exact IDs: Large numeric IDs remain unchanged instead of being rounded.
  • Pagination: preview sampling is labeled provisional; a later page may add fields.

Paste the row payload and inspect it.

Open the JSON converterOpen in examples