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

SOLVED

JSON data of a page using service

Shaheena_Sheikh
Level 5
Level 5

I want to get JSON data of a page and I came across this blog which is exactly what I want. But the problem is, I need to work with service instead of servlet. Can this be done? If yes, pls suggest the way.

Blog: http://aemlab.blogspot.com/2019/07/get-json-response-of-aem-page.html

 

1 Accepted Solution
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@Shaheena_Sheikh, if you are using the WCM Core Components V2 Page component, and your components are Sling Models, and are configured to export properties and values (based on some Java annoatations), please take a look at AEM's content exporter service; when you replace .html with .model.json, you will get a JSON representation of your entire page. https://experienceleague.adobe.com/docs/experience-manager-64/developing/components/json-exporter.ht...

 

View solution in original post

2 Replies
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@Shaheena_Sheikh, if you are using the WCM Core Components V2 Page component, and your components are Sling Models, and are configured to export properties and values (based on some Java annoatations), please take a look at AEM's content exporter service; when you replace .html with .model.json, you will get a JSON representation of your entire page. https://experienceleague.adobe.com/docs/experience-manager-64/developing/components/json-exporter.ht...