johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de.INVALID>
Subject Re: Apache Johnzon JsonbPropertyOrder behavior different from eclipse yasson.
Date Wed, 27 Jun 2018 13:46:15 GMT
 If I look at the last comment from Dmitry it seems to me that Yasson now implements the spec
behaviour, right?And that's exactly what we do as well right now, isn't?
Really looking forward to the TCKs which will soon be opened ;)
LieGrue,strub

    On Wednesday, 27 June 2018, 15:42:22 CEST, Mark Struberg <struberg@yahoo.de.INVALID>
wrote:  
 
  Oki, the both 'sources of truth' do differ.I think it's a rather pathological issue which
not that many people will hit.Otoh it is still better to fix it.
Now let's ask ourselves what would you prefer?
A. apply the naming strategy and then sort?B. sort according to reflection info and then apply
the naming?

I'd rather prefer A. Makes more sense to me. 
Even if that means that the apidoc and yasson is wrong.
Gonna trigger a discussion on the EG.
LieGrue,strub

    On Wednesday, 20 June 2018, 16:49:45 CEST, Romain Manni-Bucau <rmannibucau@gmail.com>
wrote:  
 
 spec will fix the javadoc anyway ;)

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le mer. 20 juin 2018 à 16:48, Reinhard Sandtner <reinhard.sandtner@gmail.com>
a écrit :

> as a developer i would first look at the javadoc so maybe this would be a
> good default
> devs who read specs are very rare
>
> so +1 to align default johnzon behavior to javadoc (and yasson)
>
> > Am 20.06.2018 um 16:41 schrieb Romain Manni-Bucau <rmannibucau@gmail.com
> >:
> >
> > yes but our default will not be aligned on the spec and since the spec
> was
> > not clear
> > We can probably check if yasson is like us and make it to the spec. If we
> > were different we need a toggle, not sure of the default :s
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://rmannibucau.metawerx.net/> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> > <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
> >
> >
> > Le mer. 20 juin 2018 à 16:32, Reinhard Sandtner <
> reinhard.sandtner@gmail.com>
> > a écrit :
> >
> >> hmm…. maybe we can make it configureable to not break existing apps?
> >>
> >>> Am 20.06.2018 um 15:52 schrieb Romain Manni-Bucau <
> rmannibucau@gmail.com
> >>> :
> >>>
> >>> seems it has been but it breaks us apparently which is a concern since
> we
> >>> should stay compatible.
> >>>
> >>> Romain Manni-Bucau
> >>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >>> <https://rmannibucau.metawerx.net/> | Old Blog
> >>> <http://rmannibucau.wordpress.com> | Github <
> >> https://github.com/rmannibucau> |
> >>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> >>> <
> >>
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >>>
> >>>
> >>>
> >>> Le mer. 20 juin 2018 à 15:49, Reinhard Sandtner <
> >> reinhard.sandtner@gmail.com>
> >>> a écrit :
> >>>
> >>>> hey,
> >>>>
> >>>> afaik the spec pdf and the javadoc-jar of JSR-367 are differing
> >>>>
> >>>> the pdf says to use renamed fields and the javadoc says to use the
> java
> >>>> fields names :(
> >>>>
> >>>> so imo we need clarification in the spec
> >>>>
> >>>> lg
> >>>> reini
> >>>>
> >>>>
> >>>>> Am 20.06.2018 um 15:02 schrieb Romain Manni-Bucau <
> >> rmannibucau@gmail.com
> >>>>> :
> >>>>>
> >>>>> Hi Ravi,
> >>>>>
> >>>>> Thanks to have sent the mail ;)
> >>>>>
> >>>>> for others: I asked Ravi to send this mail (he pinged on twitter)
> >> because
> >>>>> this can be a breaking change so not sure we want to directly impl
it
> >> or
> >>>>> push it back to the spec. Any opinion welcomed.
> >>>>>
> >>>>> Romain Manni-Bucau
> >>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >>>>> <https://rmannibucau.metawerx.net/> | Old Blog
> >>>>> <http://rmannibucau.wordpress.com> | Github <
> >>>> https://github.com/rmannibucau> |
> >>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> >>>>> <
> >>>>
> >>
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >>>>>
> >>>>>
> >>>>>
> >>>>> Le mer. 20 juin 2018 à 15:01, Ravisankar Challa <
> ravisankar2@gmail.com
> >>>
> >>>> a
> >>>>> écrit :
> >>>>>
> >>>>>> 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