Skip to main content

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

MicroSkills Reference

CSV to JSON

data.convert_csv_json

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

Overview

When you send CSV text or a file_ref, we parse RFC 4180 CSV into a JSON array or NDJSON with optional header mapping, null tokens, and per-column type coercion you declare in schema. We do not guess types or fetch remote files — do not send both csv and file_ref.

CSV quoting, delimiters, and nulls break naive splits. We parse deterministically.

Reliability

Same CSV and same options give the same JSON, every time. We never guess: a column you do not name in schema comes back as text, and a value that will not convert keeps its original text plus a warning rather than becoming null. Past 100,000 data rows we stop and say so in warnings, so check rowCount against what you sent. Both csv and file_ref are capped at 2 MiB. Nothing here is worth retrying unchanged: we refuse a delimiter that is not a single character or is a quote or newline, a schema type outside the six we accept, a nullValues array holding anything but strings, an outputMode other than array or ndjson, sending csv and file_ref together or neither, and CSV we cannot parse (reported as CSV_PARSE_ERROR — usually an unbalanced quote or the wrong delimiter).

Context footprint

Returns json (array or NDJSON string), rowCount, and optional warnings. A successful call costs 1 execution credit.

When to use it

When you have CSV and need structured JSON with declared types.

When you need heuristic type inference without a schema.

Scope

Note
Converts CSV to JSON with optional typing, mapping, and NDJSON output.

Non-goals

  • Does not infer types without schema
  • Does not fetch remote URLs

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformationparsing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

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
csvstringNoInline CSV text up to 2 MiB; required unless file_ref supplies the source.
file_refstringNoTenant-scoped uploaded CSV reference; omit it when csv supplies inline text.
delimiterstringNoSingle non-quote, non-newline field delimiter; defaults to a comma when omitted.
hasHeaderbooleanNoWhether the first record supplies column names; defaults to true when omitted.
schemaobjectNoOptional purpose-bound map of at most 10,000 column names to declared scalar types; omit it for string values.
mappingobjectNoOptional purpose-bound map of at most 10,000 source headers to output key strings; omit it to preserve headers.
nullValuesarrayNoFrom 0 through 1,000 exact string tokens converted to JSON null; defaults to the empty string token.
outputModestringNoWhether rows return as array or ndjson output; defaults to array when omitted.

Output schema

FieldTypeRequiredDescription
okbooleanYesAlways true for a successful conversion.
jsonstringYesConverted data: an array of row objects or one NDJSON string.
rowCountintegerYesNumber of converted data rows.
warningsarrayNoFrom 1 through 100,010 warning strings; omitted when no conversion 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_csv_json","input":{"csv":"a,b\n1,x","schema":{"a":"integer"}}}'
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_csv_json", {"csv":"a,b\n1,x","schema":{"a":"integer"}});

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 infer types without schema
  • Does not fetch remote URLs
  • Automatic type guessing
  • Both csv and file_ref in one call

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "data.convert_csv_json",
  "input": {
    "csv": "a,b\n1,x",
    "schema": {
      "a": "integer"
    }
  }
}

Examples

Coerce an integer column

Inputjson
{
  "csv": "a,b\n1,x",
  "schema": {
    "a": "integer"
  }
}
Expected outputjson
{
  "rowCount": 1,
  "json": [
    {
      "b": "x",
      "a": 1
    }
  ],
  "ok": true
}

Emit NDJSON lines

Inputjson
{
  "csv": "a,b\n1,x\n2,y",
  "outputMode": "ndjson"
}
Expected outputjson
{
  "rowCount": 2,
  "json": "{\"a\":\"1\",\"b\":\"x\"}\n{\"a\":\"2\",\"b\":\"y\"}",
  "ok": true
}
  • Ingest spreadsheet exports into JSON pipelines
  • Type-coerce CSV columns you name in schema

Avoid for

  • Automatic type guessing
  • Both csv and file_ref in one call

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

jsontransformationdata