dev@jersey.java.net

JSONWithPadding does not serialize

From: Vidit Drolia <viditdrolia_at_gmail.com>
Date: Wed, 27 Oct 2010 19:46:16 -0700

Hi,

I am trying to return a JSONP object with Spring 2.6 and Jersey 1.4.
My resource looks like the following:

@Produces({"application/xml", "application/json","application/x-javascript"})
public JSONWithPadding getMethod(@Context UriInfo info) {

       Obj flr = new Obj('some-response');
       return new JSONWithPadding(flr,"foobar");
    }

With the above setup, I get a response in both xml and json. However,
I am unable to get a response as a JSONP object. Is there anything I
am missing in the above setup? Please do let me know if I should
provide any other info to figure this out.

Thanks,

--vidit