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

Generate JSON response of an AEM Page

Avatar

Level 2

Hi Team,

We need to do customization out of box JSON response of an AEM Page.
http://localhost:4502/content/wknd/language-masters/en/magazine/jcr:content.-1.tidy.infinity.json

kotireddy4b1_0-1620404142260.png

 

How to can achieve the above JSON format by using a custom service?

 

bsloki.   Jörg_Hoh   Sham_HC 

 

@arunpatidar26  

 

Thanks
Kotireddy

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
0 Replies

Avatar

Level 3

Hey!  I think what you're looking for is the Sling Model Exporter. With it, you can define a Sling Model with the properties you want to expose, that is then available by browsing to your-page.model.json.

Avatar

Correct answer by
Community Advisor
 

Hi @kotireddy4b1 ,

 

I have explained this here. Hope it helps.

Code - https://github.com/riteshmittal/slingexporterusecase

Avatar

Community Advisor

Hi, what sort of customization you want to do.

I would suggest a proxy servlet approach to filter out model.json response using custom servlet.