render infinity.json with child nodes | Community
Skip to main content
SundarNarayanan
Level 2
Aug 23, 2019 3:43 PM UTC

render infinity.json with child nodes

Hi All,

I have a aem node structure in which certain fields are the path fields(pages are linked) referring to aem node structure of the different pages

when i retrieve the content in json format .infinity.json it pulls the content as such rather than the retrieving the content of the child pages linked

( In simple primary and foreign key relationship of the pages)

is it possible to indicate it to aem servlet so it pulls the structure of the child pages as well when requested in specific format?

Node Structure page 1

--- a

--- b

--- c -- > c1,c2

--- d

here c1,c2 are the pages linked in the page 1 by pathfield

now when i retrieve the content by .infinity.json i could see c1,c2 are getting printed as such but what i want is the system to pull all the nodes in the pages in c1,c2

Thanks

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

5 replies

arunpatidar
New Participant
Sep 16, 2019 9:22 PM UTC
Arun Patidar
SundarNarayanan
Level 2
Sep 16, 2019 2:45 PM UTC

gauravb41175071​

Umeshsondhi​

Yes i have checked the possibility but i am using aem 6.0 which uses model 1.0 version

it does not work for 6.0

Translate
Gaurav-Behl
Level 10
Sep 16, 2019 3:29 PM UTC

In that case you may write a custom code to export json using Jackson/GSON API. Obviously, you'd end up writing a lot of boilerplate code. E.g. https://www.concretepage.com/jackson-api/read-write-json-using-jackson-objectmapper-jsonparser-jsongenerator-example ,https://www.geeksforgeeks.org/convert-java-object-to-json-string-using-jackson-api/ https://www.concretepage.com/jackson-api/read-write-json-using-jackson-objectmapper-jsonparser-jsongenerator-example

Otherwise, as recommended by Adobe, upgrade your AEM version.

Translate
Umesh_Sondhi
Level 4
Sep 2, 2019 12:12 PM UTC

Hi

Please refer to the below link

AEM Developer Learning : Sling Model Exporter in AEM 6.3

Translate
Gaurav-Behl
Level 10
Aug 23, 2019 8:32 PM UTC