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.
Here's an example:
@Produces(MediaType.APPLICATION_JSON)
public Product[] getProducts() {
...
return webResource.method("GET", new GenericType<List<Product>>(){});
}
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?