Skip to content

Json To Liquid MCP tool

MCP findutils: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.

Arguments

application/json
  • source

    string required

    The data as text: JSON, a JS object literal, a Python dict, a PHP array or YAML.

  • language

    string optional

    Which dialect the source is written in. auto (default) tries JSON, then a JS/Python/PHP literal, then YAML. One of auto · json · javascript · python · php · yaml. Default "auto".

  • root

    string optional

    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 optional

    Add | escape to every output in the template skeleton. Default false. Default false.

Example arguments

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