


I need to export a json feed of my whole news page using servlets how can i export the JSON Feed Kindly give some solutions
@arunpatidar @SantoshSai @DEBAL_DAS @Fanindra_Surat @lukasz-m @Pulkit_Jain_
Views
Replies
Sign in to like this content
Total Likes
Hi @Nandheswara ,
Did you tried with one of the OOTB functionality? eg. http://localhost:4502/editor.html/content/we-retail/language-masters/en/men.model.tidy.json
Reference: Obtaining Page Information in JSON Format
If that doesn't suits your requirement , I would suggest to use Sling Model Exporter rather than servlet.
Exporting page content as JSON using Sling Model Exporter you can get below advantages
Sling model exporter is very useful when you want to publish your data to third party system’s or consuming within the site using ajax request if you have sling models and wants to serialize them, by providing simple @Exporter annotations to the existing sling models you can convert your model to CaaS based URL.
Here is the github code: SampleSlingModelExporter.Java from Adobe-Consulting-Services
Reference: No Servlets Required: Exporting Data with Sling Models
However, If you still want's to achieve it through Servlet - @arunpatidar has done POC on it, please refer: https://github.com/arunpatidar02/aem63app-repo/tree/master/java/page/json
Hope that helps!
Regards,
Santosh
Views
Replies
Sign in to like this content
Total Likes
Hi @Nandheswara ,
Did you tried with one of the OOTB functionality? eg. http://localhost:4502/editor.html/content/we-retail/language-masters/en/men.model.tidy.json
Reference: Obtaining Page Information in JSON Format
If that doesn't suits your requirement , I would suggest to use Sling Model Exporter rather than servlet.
Exporting page content as JSON using Sling Model Exporter you can get below advantages
Sling model exporter is very useful when you want to publish your data to third party system’s or consuming within the site using ajax request if you have sling models and wants to serialize them, by providing simple @Exporter annotations to the existing sling models you can convert your model to CaaS based URL.
Here is the github code: SampleSlingModelExporter.Java from Adobe-Consulting-Services
Reference: No Servlets Required: Exporting Data with Sling Models
However, If you still want's to achieve it through Servlet - @arunpatidar has done POC on it, please refer: https://github.com/arunpatidar02/aem63app-repo/tree/master/java/page/json
Hope that helps!
Regards,
Santosh
Views
Replies
Sign in to like this content
Total Likes