HomeContent Modelling & Delivery › JSON delivery & content services

JSON delivery & content services

Purpose: Serve content as JSON for SPAs and apps: exporters, .model.json, and API-shape discipline.

Who this page is for

AudienceWhy it matters to you
Frontend engineersConsuming AEM headlessly
Backend engineersDesigning the JSON

The delivery options

MechanismShapeUse
Sling default JSON (.json, .infinity.json)Raw repository dumpDev inspection only — never expose in prod
Sling Model Exporter (.model.json)Your model's designed JSONDefault choice for component/page data
Page-level .model.json (SPA pattern)Whole page: containers + componentsSPA editor / app rendering AEM pages
Assets HTTP APICF/asset JSONHeadless CF consumption
Custom servletAnythingAggregations the above can't express

Exporter output is an API contract

Once an app consumes gold-hospital.model.json, the JSON shape is a versionable interface:

Caching JSON

JSON endpoints cache at the dispatcher like any URL if they have an extension and no query strings. Design:

GOOD  /content/phi/plans/gold-hospital.model.json      (cacheable, invalidated on publish)
BAD   /bin/planapi?id=gold-hospital                    (query string; path-registered; uncacheable by default)

React translation

.model.json is your GET /api endpoint whose response shape you control in the Sling Model — the same model that feeds HTL. One adapter, two channels; keep it boring and additive.

Quick navigation