How to Export JSON (Business Logic) of multiple components in a page using Sling Model Exporter | Community
Skip to main content
mayank0928
Level 3
December 5, 2018

How to Export JSON (Business Logic) of multiple components in a page using Sling Model Exporter

  • December 5, 2018
  • 1 reply
  • 5061 views

I am not able export JSON of multiple components in a page using Sling Model Exporter.

If I am using http://localhost:4502/content/test.model.json, then I am getting the simple json of the Page.

If I am using http://localhost:4502/content/test.infinity.json then I am getting the Deep level JSON for all the Node Content.

I basically want to get the JSON for my business logic developed in JAVA, that to be of multiple components lying on the page.

Using @Exporter Annotation. I am able to get the JSON for Individual Component, but I am not able to get that JSON for multiple components.

Would be grateful if anyone could provide the correct solution!

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

1 reply

arunpatidar
Community Advisor
Community Advisor
December 5, 2018

Hi,

You can create exporter for multiple components but when you will access page using .model.json, it will return the JSON response from multiple components

Adobe Experience Manager Help | Understanding Sling Model Exporters in AEM

e.g.

http://localohost:4502/content/my-resource.model.json

Arun Patidar
mayank0928
Level 3
December 5, 2018

It will return only the JSON which is stored under the node /content/my-resource/jcr:content/...

But my question is how to Export the JSON of Multiple Components on a particular page that to be of a JAVA Based Logic, not the simple data which you put inside the Dialog.