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
BedrockMission!

Learn More

View all

Sign in to view all badges

Generate JSON response of an AEM Page

Avatar

Avatar
Level 1
kotireddy4b1
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
kotireddy4b1
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
kotireddy4b1
Level 1

07-05-2021

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

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Level 6
Ritesh_M
Level 6

Likes

123 likes

Total Posts

99 posts

Correct Reply

37 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Boost 5
Level 6
Ritesh_M
Level 6

Likes

123 likes

Total Posts

99 posts

Correct Reply

37 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
Ritesh_M
Level 6

08-05-2021

 

Hi @kotireddy4b1 ,

 

I have explained this here. Hope it helps.

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

Answers (3)

Answers (3)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

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

Avatar

Avatar
Boost 100
Level 5
Bhuwan_B
Level 5

Likes

107 likes

Total Posts

100 posts

Correct Reply

37 solutions
Top badges earned
Boost 100
Give Back 3
Affirm 25
Establish
Give Back
View profile

Avatar
Boost 100
Level 5
Bhuwan_B
Level 5

Likes

107 likes

Total Posts

100 posts

Correct Reply

37 solutions
Top badges earned
Boost 100
Give Back 3
Affirm 25
Establish
Give Back
View profile
Bhuwan_B
Level 5

08-05-2021

Avatar

Avatar
Affirm 3
Level 2
koenve
Level 2

Likes

13 likes

Total Posts

15 posts

Correct Reply

3 solutions
Top badges earned
Affirm 3
Establish
Validate 1
Give Back
Boost 5
View profile

Avatar
Affirm 3
Level 2
koenve
Level 2

Likes

13 likes

Total Posts

15 posts

Correct Reply

3 solutions
Top badges earned
Affirm 3
Establish
Validate 1
Give Back
Boost 5
View profile
koenve
Level 2

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