Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to retrieve dita output in JSON format


Level 2

Hi all,

We are currently evaluating XML Documentation for AEM. The idea is to have all the technical content (dita assets) stored in AEM and exposed them via a bunch of services which the frontend will then consume and render accordingly. The existing frontend has a rich set of JSON APIs exposed out of the existing platform that AEM is set to replace.

We can of course use the Assets HTTP API to retrieve these dita payloads. However, would it not be possible to put one or more of these assets (dita) on a page and then call the page.json to retrieve its JSON output which will contain the dita asset? My current understanding is that doing so will simply return a link to the dita asset in the page's JSON payload. Equally, Sling Model Exporter framework [0] can also be used to customise the JSON by including selective parts of the dita asset in the payload. I am aware of the REST APIs [1] that XML Documentation offers but the need is pretty bespoke JSON payloads to support the headless use case.

Any thoughts or pointers would be immensely appreciated. Many thanks...

[0] Understand Sling Model Exporter


1 Reply


Level 1

@av-ey did you end up solving this? We're looking at doing something similar...