Hi there,
I'm trying to implement pagination using Jersey and Jackson. I don't want
to modify my API, so I would like the pagination to take place during
serialization.
To simplify, lets pretend I simply want to add the size of a collection
when serializing it.
The current output is:
[
{
There is no functionality to do it the way you suggested (although
immutability of classes is not a blocker, you could use mix-in
annotations).
But wouldn't it be simpler to use a simple wrapper structure to get
structure match the output, instead of trying to change the whole
serialization logic
Hi Tatu, thanks for the reply.
I wanted to avoid using a wrapper as my REST API is built on top of
interfaces used for other things, and I would like to keep them untouched.
I have a large number of calls returning any Collection (Set, List,
UnmodifiableSet, etc.), so doing it purely on Jackson
On Mon, Feb 13, 2017 at 4:46 AM, Clément Poulain wrote:
> Hi Tatu, thanks for the reply.
>
> I wanted to avoid using a wrapper as my REST API is built on top of
> interfaces used for other things, and I would like to keep them untouched.
> I have a large number of calls returning any Collection (S