You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Daniel Klco <dk...@apache.org> on 2014/04/01 17:39:35 UTC

[Discuss] Expose JSON Servlet Helpers

I just wanted to bring this up quick.  Does anyone have an objection to
exposing the classes described here:
https://issues.apache.org/jira/browse/SLING-3485

I'm facing an issue on a project where we need to serialize a resource
returned from a query to JSON in the same format as the default JSON get
servlet.  I'll likely just duplicate the classes, but this seems like a
poor solution.  If we expose these classes to the OSGi container it will
make the next person's job easier.

Thanks,
Dan

Re: [Discuss] Expose JSON Servlet Helpers

Posted by Justin Edelson <ju...@justinedelson.com>.
Hi Dan,
First off, I wouldn't suggest duplicating the classes. You should
embed them in your bundle. Not as elegant as importing them, but
better than duplicating them.

As to the question, I think if we're going to export these, they
should be in a better named package and not necessarily in the get
servlet bundle. Can these be part of the commons.json bundle?

Regards,
Justin

On Tue, Apr 1, 2014 at 10:39 AM, Daniel Klco <dk...@apache.org> wrote:
> I just wanted to bring this up quick.  Does anyone have an objection to
> exposing the classes described here:
> https://issues.apache.org/jira/browse/SLING-3485
>
> I'm facing an issue on a project where we need to serialize a resource
> returned from a query to JSON in the same format as the default JSON get
> servlet.  I'll likely just duplicate the classes, but this seems like a
> poor solution.  If we expose these classes to the OSGi container it will
> make the next person's job easier.
>
> Thanks,
> Dan