# `PhoenixKitCatalogue.Export.UniversalJson`
[🔗](https://github.com/BeamLabEU/phoenix_kit_catalogue/blob/v0.19.0/lib/phoenix_kit_catalogue/export/universal_json.ex#L1)

Universal JSON export encoder.

Produces a generic, destination-agnostic JSON dump of catalogue items
across one or more catalogues.

## Output shape

    {
      "catalogues": [{"uuid": "...", "name": "..."}, ...],
      "exported_at": "2026-06-26T16:00:00Z",
      "index": 1111111111,
      "items": [
        {"name": "...", "sku": "...", "base_price": "2222.00", "unit": "piece", "catalogue": "..."}
      ]
    }

Filename includes the export date and local time (`YYYY-MM-DD HH-MM`): a
single catalogue is named after the catalogue (e.g.
`"My Catalogue 2026-06-26 19-19.json"`); multiple catalogues produce
`"Catalogues 2026-06-26 19-19.json"`.

# `render`

Renders the universal JSON export.

`ctx` must have keys:
- `:items` — list of items (with `:catalogue` association preloaded)
- `:index` — unix timestamp integer
- `:catalogues` — list of catalogue structs

Returns `{filename, iodata, mime_type}`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
