Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative solution for JSONContentBuilder #1

Open
dlh3 opened this issue May 16, 2016 · 2 comments
Open

Alternative solution for JSONContentBuilder #1

dlh3 opened this issue May 16, 2016 · 2 comments

Comments

@dlh3
Copy link

dlh3 commented May 16, 2016

Let me begin by saying thank you. These samples and the accompanying SlideShare deck from Circuit 14 were immensely helpful in solving a problem that I was faced with.

I found the JSONContentBuilder so helpful that I nominated it for inclusion in the ACS-AEM-Samples project. Upon doing so, it was suggested that the JSON Writer API may be more efficient/appropriate than the Sling Request Processor. Following that suggestion, I have reimplemented the JSONContentBuilder and submitted it to the ACS-AEM-Samples project.

Prior to reimplementing with the JSON Writer, I experienced an issue with a content path that didn't have a jcr:content node (invalid content). I resolved the issue by implementing the status code methods on the FakeHttpResponse, but it was not as clean to handle as the JSON Writer approach allows for.

Out of curiosity, was the Sling Request Processor approach used for a particular reason?

Thanks again!

@mwmd
Copy link
Owner

mwmd commented May 25, 2016

Great to hear you've found the material & code helpful to solve your requirement!
The Sling Request Processor approach was simply used as one example of how to seralize the content in JSON. The main purpose of the example is to demonstrate usage of the ContentBuilder API. For that, the content had to get seralized to JSON, and using the Request Processor was one easy way to do it. That code has only been produced for demonstration purposes, so there's no specific requirement to use Request Processor instead of the JSON Writer.

@amoghdaryapurkar
Copy link

amoghdaryapurkar commented Jan 10, 2017

Out of curiosity.. This is very helpful and very well written code I could find till now. But, I am still not clear with the ReplicationAgent requirement. As i could not see TransportHandler in this project and it looks like it is necessary while creating replication agent with this content builder. Can you please help me to get clarify on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants