Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

JSON to CSV

data.convert_json_csv

ProductionBounded custom (Class B)Deterministicverifiablefastv1.0.0
File inputNo network

Overview

When you send a JSON array or object (inline or file_ref), we flatten nested fields with your path separator and emit RFC 4180 CSV with deterministic header ordering. Arrays can stay as JSON strings, stringify as text, or explode into rows when unambiguous — do not use explode when multiple array fields would conflict.

LLM CSV conversion drops fields and mishandles nesting. We flatten deterministically.

Reliability

Same JSON and same options give the same bytes back, which makes the output safe to diff or checksum. Columns are the union of every field we met, sorted alphabetically unless you keep discovery order, and cells are separated by commas whatever your data looks like. Three refusals, none of them worth retrying unchanged: SIZE_LIMIT_EXCEEDED when the records, or the rows an explode expands them into, pass maxRows — raise maxRows up to 100,000 or split the document; AMBIGUOUS_RESULT when explode meets a record holding two array fields, since we will not guess which one drives the rows — switch that field to json or stringify; and INVALID_INPUT when recordsPath points at nothing — check the path against your document. Sending json and file_ref together, or neither, is refused as well.

Context footprint

Returns csv text plus headers, rowCount, columnCount, flattening, and warnings. A successful call costs 2 execution credits.

When to use it

When you need CSV from JSON records you already have.

When explode mode would hit multiple array fields (AMBIGUOUS_RESULT).

Scope

Note
Deterministically converts JSON records to RFC 4180 CSV.

Non-goals

  • Does not parse CSV back to JSON
  • Does not fetch remote JSON

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call2 credits

File handling

Accepts file_refProduces file_refMax input2 MBMax file size2 MB

File limits

Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.

LimitValueLimited by
Maximum size per input file2 MiBSkill maximum

How we handle your data

Sensitive output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response may contain submitted or transformed content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
jsonobjectNoInline source containing one explicitly open JSON record or up to 100,000 such records; required unless file_ref is used.
file_refstringNoTenant-scoped uploaded JSON reference; omit it when json supplies the inline source.
recordsPathstringNoDot or slash path selecting the record object or array; omit it to convert the source root.
pathSeparatorstringNoNon-empty separator joining nested keys into CSV headers; defaults to a period when omitted.
arrayModestringNoHow arrays inside a record are represented; defaults to json when omitted.
includeHeaderbooleanNoWhether to emit the CSV header line; defaults to true when omitted.
nullValuestringNoCSV cell text used for explicit JSON null; defaults to an empty string when omitted.
missingValuestringNoCSV cell text used when a record lacks a discovered field; defaults to an empty string when omitted.
quoteModestringNoWhether to quote minimally or quote every CSV cell; defaults to minimal when omitted.
preserveDiscoveryOrderbooleanNoWhether headers retain first-seen order instead of sorted order; defaults to false when omitted.
maxRowsintegerNoMaximum rows accepted after optional array expansion; defaults to 100,000 when omitted.

Output schema

FieldTypeRequiredDescription
csvstringYesGenerated RFC 4180 CSV text.
headersarrayYesFrom 0 through 10,000 flattened string column names in emitted order.
rowCountintegerYesNumber of emitted data rows.
columnCountintegerYesNumber of emitted CSV columns.
flatteningobjectYesClosed receipt object containing the applied pathSeparator and arrayMode properties.
warningsarrayYesFrom 0 through 100,000 bounded warning strings; empty when no flattening warning occurred.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"data.convert_json_csv","input":{"json":[{"id":1,"name":"Alice"}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("data.convert_json_csv", {"json":[{"id":1,"name":"Alice"}]});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not parse CSV back to JSON
  • Does not fetch remote JSON
  • Ambiguous multi-array explode
  • Datasets beyond maxRows

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "data.convert_json_csv",
  "input": {
    "json": [
      {
        "id": 1,
        "name": "Alice"
      }
    ]
  }
}

Examples

Convert a simple object array

Inputjson
{
  "json": [
    {
      "id": 1,
      "name": "Alice"
    }
  ]
}
Expected outputjson
{
  "rowCount": 1,
  "flattening": {
    "pathSeparator": ".",
    "arrayMode": "json"
  },
  "csv": "id,name\n1,Alice\n",
  "headers": [
    "id",
    "name"
  ],
  "warnings": [],
  "columnCount": 2
}

Flatten nested objects with dot paths

Inputjson
{
  "json": [
    {
      "id": 1,
      "meta": {
        "tag": "x"
      }
    }
  ]
}
Expected outputjson
{
  "rowCount": 1,
  "flattening": {
    "pathSeparator": ".",
    "arrayMode": "json"
  },
  "csv": "id,meta.tag\n1,x\n",
  "headers": [
    "id",
    "meta.tag"
  ],
  "warnings": [],
  "columnCount": 2
}
  • Spreadsheet export from API JSON
  • Reporting pipelines
  • Flat file exchange

Avoid for

  • Ambiguous multi-array explode
  • Datasets beyond maxRows

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

csvjsontransformationdata