johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravisankar Challa <ravisank...@gmail.com>
Subject Apache Johnzon JsonbPropertyOrder behavior different from eclipse yasson.
Date Wed, 20 Jun 2018 12:55:36 GMT
Hi Devs,

I got something form here
https://github.com/eclipse-ee4j/yasson/issues/23

It Says

Properties names specified in @jsonbpropertyorder annotation must be the
original names of properties as it’s specified in Java class.

as per yasson it should be
@JsonbPropertyOrder({" lName", " fName"})
class Person {
    @JsonbProperty("last_name")
    public String lName;
    @JsonbProperty("first_name")
    public String fName;
}

But Johnzon uses the renamed fields.

as per spec it should be
@JsonbPropertyOrder({" last_name", " first_name"})
class Person {
    @JsonbProperty("last_name")
    public String lName;
    @JsonbProperty("first_name")
    public String fName;
}

Thanks,
Ravi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message