Hi,
can you provide a reproducible test case because I am not able to
simulate this behavior? Which Jersey version are you using and how does
your JSONConfiguration look like?
thanks,
Michal
On 4.9.2012 0:02, Pulkit Singhal wrote:
> On Mon, Sep 3, 2012 at 4:54 PM, Pulkit Singhal
> <pulkitsinghal_at_gmail.com <mailto:pulkitsinghal_at_gmail.com>> wrote:
>
> My Jersey resource acts as the middle tier.
> It collects xml data from a 3rd party and serializes it back to my
> clients as JSON.
>
>
> EDIT, the code example should actually look like this:
> @Produces(MediaType.
> APPLICATION_JSON)
> public Product[] getProducts() {
> ...
> return webResource
> .method("GET", new GenericType<List<Product>>(){})
> *.toArray(new Product[0])*;
> }
>
>
> But the JSON it returns isn't quite what I would expect to get:
> {
> "Product[]":[
> {...},
> {...}
> ]
> }
>
> There's an artificial key "Product[]" which I would rather name
> something like "products" ... is there some way to take control of
> this in Jersey?
>
>