{"title":"serialize - Liquid Filter Reference","slug":"serialize-filter-reference","url":"https://support.storeconnect.com/articles/serialize-filter-reference","url_markdown":"https://support.storeconnect.com/articles/serialize-filter-reference.md","subtitle":null,"summary":"Converts a collection or object to a JSON string. Alias of the `json` filter. Use `serialize` to output Liquid data as JSON for JavaScript or API consumption.","type":"Developer_Documentation","video_url":"","keywords":"liquid, filters, serialize, collections, storeconnect","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"## Description\n\nSerializes the collection as a JSON string\n\n| Property | Value |\n|----------|-------|\n| **Return Type** | string |\n| **Category** | collections |\n| **Alias** | `json` |\n\n## Examples\n\n\n```liquid\n\n{{ pets | serialize }}\n```\n\n\n**Output:** `[{\"name\":\"Fido\",\"type\":\"dog\"},{\"name\":\"Mittens\",\"type\":\"cat\"}]`"}