Hello arunpatidar26, kautuksahni, Do you have any suggestions over generating whole page and its associated components as json. We are using sling model exporters, and using .model.json for getting the json out of a resourcetype, but wanted to know what we can do if we want to expose whole properties and components.
Solved! Go to Solution.
Views
Replies
Total Likes
Yes, you can try. but make sure you exclude properties before getting a Model from the resource.(Setting exclude property value to null can help)
Views
Replies
Total Likes
you need to write custom implementation
example - AEM - Get JSON response of an AEM Page
Views
Replies
Total Likes
Hello Arun,
Need your inputs, I have went through your custom implementation, can't we use something as below to iterate to child resource and inject its own models and adapt to json instead of manually transforming node to json, maintaining custom ignore properties and all?
Resource resource = resourceResolver.getResource("/mysite/component/breadcrumb");
slingScriptHelper.getService(ModelFactory.class).getModelFromResource(resource);
Views
Replies
Total Likes
Yes, you can try. but make sure you exclude properties before getting a Model from the resource.(Setting exclude property value to null can help)
Views
Replies
Total Likes
Views
Likes
Replies