Javascript can’t handle my longs, so I want RestEasy to wrap them with quotation marks to turn them into strings.
My DTO is :
public class DTO {
Long id;
}
and I want this to be transferred as {"id":"2394872352498"}
Unfortunately, right now (by default) it is transferred as {"id":2394872352498} which is causing problems.
I’m using Jackson to serialize the data.
Thanks for any help!
One solution I found:
Then, this serializer needs to be registered :