AEM - html page source code is XML or json ?

Avatar

Avatar

arunk85184451

Avatar

arunk85184451

arunk85184451

02-03-2020

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 ?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

BrianKasingli

MVP

Avatar

BrianKasingli

MVP

BrianKasingli
MVP

02-03-2020

@arunk85184451,

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...

Hope this helps,

Brian.

Answers (2)

Answers (2)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

958

Correct Answer

820

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

958

Correct Answer

820
Arun_Patidar
MVP

03-03-2020

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 

Avatar

Avatar

arunk85184451

Avatar

arunk85184451

arunk85184451

02-03-2020

thanks for your help