Skip to main content

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

MicroSkills Reference

Flatten JSON

data.flatten_json

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

Overview

When you send a nested JSON object, we return a deterministic list of path/value/type entries using dot, JSON Pointer, or bracket notation. You choose how arrays are indexed, serialized, or skipped. Reversible with data.unflatten_json for compatible settings. Do not use this for documents that exceed depth or transport size limits. Accepts file input via file_ref — no need to extract file content first.

Agents flatten JSON inconsistently. You get the same path list every time for the same object and options.

Reliability

VERIFIABLE and deterministic for the same input and options. Provide exactly one of json or file_ref. Validation errors (not retryable — fix input): missing or non-object json; both json and file_ref supplied; maxDepth exceeded during traversal. Pair with data.unflatten_json using the same pathStyle for round-trips.

Context footprint

Returns paths, pathCount, maxDepthObserved, and warnings. A successful call costs 1 execution credit.

When to use it

Before diffing, mapping, or tabular conversion of JSON you already have.

When the document exceeds configured depth or transport size limits.

Scope

Note
Flattens nested JSON into deterministic path/value pairs.

Non-goals

  • Does not fetch remote JSON
  • Does not transform or coerce values
  • Does not validate against an external schema

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformation

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
jsonobjectNoPurpose-bound nested JSON object whose additional properties are the document members to flatten; omit it when file_ref is the source. Values are unconstrained RFC 8259 JSON items.
file_refstringNoTenant-scoped uploaded JSON reference. Omit it to use the required inline json; never send both.
pathStylestringNoPath notation; omit it for dot.
arrayModestringNoHow arrays are emitted; omit it for index.
includeNullsbooleanNoWhether null leaves are kept; omit it for true.
maxDepthintegerNoWalk depth ceiling; omit it for 64.
sortPathsbooleanNoWhether paths are sorted lexicographically; omit it for true.

Output schema

FieldTypeRequiredDescription
pathsarrayYesBounded array of flattened path/value/type entries in the chosen order.
pathCountintegerYesHow many path entries were returned.
maxDepthObservedintegerYesDeepest nesting level seen in the input.
warningsarrayYesBounded array of 0 through 64 flatten warnings with code, message, and severity.

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.flatten_json","input":{"json":{"customer":{"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.flatten_json", {"json":{"customer":{"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 fetch remote JSON
  • Does not transform or coerce values
  • Does not validate against an external schema
  • Extremely deep or oversized documents beyond limits
  • When you need in-place mutation of the original object

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "data.flatten_json",
  "input": {
    "json": {
      "customer": {
        "name": "Alice"
      }
    }
  }
}

Examples

Nested customer name with dot paths

Inputjson
{
  "json": {
    "customer": {
      "name": "Alice"
    }
  }
}
Expected outputjson
{
  "paths": [
    {
      "path": "customer.name",
      "type": "string",
      "value": "Alice"
    }
  ],
  "maxDepthObserved": 2,
  "warnings": [],
  "pathCount": 1
}

String array with bracket path style

Inputjson
{
  "json": {
    "tags": [
      "x",
      "y"
    ]
  },
  "pathStyle": "bracket"
}
Expected outputjson
{
  "paths": [
    {
      "path": "tags[0]",
      "type": "string",
      "value": "x"
    },
    {
      "path": "tags[1]",
      "type": "string",
      "value": "y"
    }
  ],
  "maxDepthObserved": 2,
  "warnings": [],
  "pathCount": 2
}
  • Prepare JSON for diffing or CSV conversion
  • Map nested fields to columns
  • Inspect structure before transformation

Avoid for

  • Extremely deep or oversized documents beyond limits
  • When you need in-place mutation of the original object

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