# Json To Liquid — REST API endpoint `json-to-liquid`

Turn structured data into Shopify Liquid. The input can be JSON, a JavaScript object literal (unquoted keys, single quotes, trailing commas, comments), a Python dict (True/False/None, tuples), a PHP array (=> pairs, array()) or YAML; auto detects which. Two outputs: an assigns block that recreates the data with {% assign %} and {% capture %} (nested keys flattened to snake_case names, scalar arrays as split strings, arrays of objects as parallel arrays, deeper structures as JSON strings), and a rendering template skeleton with {{ paths }}, {% for %} loops and {% if %} guards for the same object as it would arrive in a theme. Every lossy mapping is listed in warnings. Liquid has no object or array literals, so the assigns block is the honest community mapping, not a lossless encoding. The browser page at /developers/json-to-liquid/ previews the result with LiquidJS.

- Category: data
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, no API keys, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/json-to-liquid/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/json-to-liquid/
- Same tool on the other surface: https://findutils.com/mcp/json-to-liquid/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/json-to-liquid/execute \
  -H "Content-Type: application/json" \
  -d '{
    "source": "{ shop: { name: '\''Acme'\'', open: true }, tags: ['\''new'\'', '\''sale'\''] }"
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/json-to-liquid
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `source` | string | yes | The data as text: JSON, a JS object literal, a Python dict, a PHP array or YAML. |
| `language` | string (auto \| json \| javascript \| python \| php \| yaml) | no | Which dialect the source is written in. auto (default) tries JSON, then a JS/Python/PHP literal, then YAML. Default: `"auto"`. |
| `root` | string | no | Optional variable that holds the data in the theme, such as product or section.settings. The template reads root.key and the assigns become root_key. Default: top-level keys are the variables. |
| `escape_html` | boolean | no | Add \| escape to every output in the template skeleton. Default false. Default: `false`. |

Example arguments (verified):

```json
{
  "source": "{ shop: { name: 'Acme', open: true }, tags: ['new', 'sale'] }"
}
```

OpenAPI 3.1 spec: https://findutils.com/api/openapi.json · Interactive docs: https://findutils.com/api/docs/

## Also an MCP tool

```bash
claude mcp add findutils --transport http https://mcp.findutils.com/
```

Then ask the client to call `findutils:json_to_liquid`. Full MCP reference: https://findutils.com/mcp/json-to-liquid/

---
Full catalog: GET https://api.findutils.com/api/tools · https://findutils.com/api/ · https://findutils.com/llms.txt
