Highlighted

How to retrieve dita output in JSON format

av-ey

22-11-2019

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] https://helpx.adobe.com/content/dam/help/en/xml-documentation-solution/3-4/XML-Documentation-for-Ado...