AEM - html page source code is XML or json ? | Community
Skip to main content
Level 4
Mar 2, 2020 9:15 PM UTC
Solved

AEM - html page source code is XML or json ?

Hello,

 

in AEM ,html pages are in json format . i think yes ?

 

any html page created in AEM , Like test.html can be viewed as .test.model.json ? how we can see as xml format ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
BrianKasingli
BrianKasingliAccepted solution
New Participant
Mar 2, 2020 9:29 PM UTC

@sonuk85184451,

The new AEM Core WCM Components are built with Sling Models, which Sling Models includes a single exporter, using the Jackson framework. Jackson allows you to expose and format Sling Model Object's properties in JSON format. 

There's another way to obtain JSON from any resource and AEM. You can replace ".html" with "tidy.infinity.json"; which the request triggers the default Sling GET servlet in JSON mode. read more here: https://sling.apache.org/documentation/bundles/rendering-content-default-get-servlets.html

Visit this thread of Adobe's Forum topic to review a conversation about converting content as XML: https://experienceleaguecommunities.adobe.com/t5/Adobe-Experience-Manager/Adobe-CQ-Export-Content-As-XML/qaq-p/228129/comment-id/35560

Hope this helps,

Brian.

4 replies

arunpatidar
New Participant
Mar 3, 2020 8:42 AM UTC

If xml rendering is not blocked from dispatcher you can view xml response of page using xml extension.

Example - 

http://localhost:4502/content/MyApp/en.xml 

Translate
Arun Patidar
Level 4
Mar 2, 2020 9:45 PM UTC

thanks for your help

Translate
BrianKasingli
BrianKasingliAccepted solution
New Participant
Mar 2, 2020 9:29 PM UTC

@sonuk85184451,

The new AEM Core WCM Components are built with Sling Models, which Sling Models includes a single exporter, using the Jackson framework. Jackson allows you to expose and format Sling Model Object's properties in JSON format. 

There's another way to obtain JSON from any resource and AEM. You can replace ".html" with "tidy.infinity.json"; which the request triggers the default Sling GET servlet in JSON mode. read more here: https://sling.apache.org/documentation/bundles/rendering-content-default-get-servlets.html

Visit this thread of Adobe's Forum topic to review a conversation about converting content as XML: https://experienceleaguecommunities.adobe.com/t5/Adobe-Experience-Manager/Adobe-CQ-Export-Content-As-XML/qaq-p/228129/comment-id/35560

Hope this helps,

Brian.

Translate
Level 4
Mar 2, 2020 9:39 PM UTC
Thank You for responding , i am new to AEM , i am putting some snapshots . please have a look
Translate