users@jsonb-spec.java.net

[jsonb-spec users] Re: json property doesn't resolve alias

From: Ehsan Zaery Moghaddam <zaerymoghaddam_at_gmail.com>
Date: Mon, 27 Feb 2017 09:26:09 +0100

Hi Eddú

In the JavaDoc for @JsonbPropertyOrder is mentioned that:

​​
> Specifies order in which fields (or JavaBean properties) will be
> serialized.



I think the issue in the code is because you have to specify your bean
property names in
@JsonbPropertyOrder not the name you given to them via @JsonbProperty.
E.g. you have to change the @JsonbPropertyOrder on top of the Person class
as below:

wrong: @JsonbPropertyOrder({"name", "*lastName*"})
right: @JsonbPropertyOrder({"name", "*lastname*"})

​I think it was due to a bug that has been fixed in the new version.​

Ehsan Zaery Moghaddam
Senior Java Developer
Email: zaerymoghaddam_at_gmail.com
<http://ir.linkedin.com/in/zaerymoghaddam>
<http://twitter.com/zaerymoghaddam> <http://github.com/moghaddam>


On Mon, Feb 27, 2017 at 1:00 AM, Eddú Meléndez Gonzales <
eddu.melendez_at_gmail.com> wrote:

> Hi,
>
> I am testing 1.0.0.M1 and it used to work before the upgrade. After the
> update to M1, properties with custom name are not resolved.
>
> Repo to reproduce: https://github.com/perujug/javaee8-jsonb
>
> I was trying to create a new issue in JIRA but couldn't login.
>
> Best Regards
>
> *Eddú Meléndez Gonzales*
> *eddu.melendez_at_gmail.com* <eddu.melendez_at_gmail.com>
> *_at_eddumelendez*
>
>
>