[Jersey] Re: how to produce JSONP

From: Jakub Podlesak <>
Date: Mon, 05 Sep 2011 15:44:28 +0200

Hi Leonardo,

You may want to utilize the JSONWithPadding wrapper (see [1]).
There is an example at [2].



On 5.9.2011 14:11, Leonardo wrote:
> Hello everyone.
> @Produces allows me to change from default XML to JSON, so i can
> translate java objects into javascript objects in a very standard and
> transparent way.
> Now i need to generate JSON with padding, in other words surround the
> root object with an arbitrary callback function.
> Any guidance? can the serializer in charge of json construction
> receive this modification easily?