Generate JSON response of an AEM Page | Community
Skip to main content
Level 2
May 7, 2021
Solved

Generate JSON response of an AEM Page

  • May 7, 2021
  • 4 replies
  • 1599 views

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

 

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

 

bsloki.   Jörg_Hoh   Sham_HC 

 

@14414417  

 

Thanks
Kotireddy

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ritesh_Mittal
 

Hi @kotireddy4b1 ,

 

I have explained this here. Hope it helps.

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

4 replies

koenve
Level 2
May 7, 2021

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.

Ritesh_Mittal
Community Advisor and Adobe Champion
Ritesh_MittalCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
May 8, 2021
 

Hi @kotireddy4b1 ,

 

I have explained this here. Hope it helps.

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

Bhuwan_B
Community Advisor
Community Advisor
May 8, 2021
arunpatidar
Community Advisor
Community Advisor
May 8, 2021

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.

Arun Patidar