users@jersey.java.net

Re: [Jersey] JSONP

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Tue, 26 Jan 2010 14:54:40 -0800

On Tue, Jan 26, 2010 at 6:45 AM, Jakub Podlesak <Jakub.Podlesak_at_sun.com> wrote:
> On Fri, Jan 22, 2010 at 12:43:06PM -0800, Tatu Saloranta wrote:
...
> The wrapper type is always the same. I just wanted to avoid the explicit
> dependency, so was suggesting the filter thing. But as Paul pointed in the other e-mail, Jersey
> depends on Jackson anyway.

Yes, it'd be nice not to have hard dependencies.
But since there is already a dependency, yes, having one simple
dependency seems like the most robust way to go.

(if we did want to keep separation, one way would be to only use class
name to indicate "yes is a wrapper"; and wrapper.toString() method
(overriding Object.toString()) to pass wrapped function name)

> So if you introduce such a wrapper in Jackson JAX-RS provider,
> and handle it so that only the JSON specific part is serialized out,
> i can change the JSONWithPadding class in Jersey so that it extends from it
> and it should be it.
>
> Sounds like a plan?

Sounds like a plan. Let me add a Jira task for Jackson for this.

-+ Tatu +-