Customize Restful json bean properties

Skip to first unread message

Daniel del Río Horta

Jun 2, 2020, 9:46:55 AM6/2/20
to Payara Forum
I'm trying to change the name of a bean's attribute in a RESTFUL response.  I know Payara 5 uses Jsonb as default serialization library but seems that  @JsonbProperty annotation is ignored.
E.g. If the bean is:

public class MyBean {

    private Long id;


The returned json is { "id": 1234 }, instead of { "myId": 1234 }

Someone has encountered the same problem or I'm missing something?

Thanks in advance

Сергей Хилков

Sep 29, 2021, 2:16:08 AM9/29/21
to Payara Forum
Hi, Daniel.
Have you found any solution?
I have similar problem... And it seems that there is not easy way to solve it.

вторник, 2 июня 2020 г. в 20:46:55 UTC+7, Daniel del Río Horta:
Reply all
Reply to author
0 new messages