johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Junckes Filho <ivanjunc...@gmail.com>
Subject Re: Change default converter suggestion
Date Fri, 15 Mar 2019 12:23:31 GMT
Is it possible that you point an example Romain?

On Thu, Mar 14, 2019 at 6:52 PM Romain Manni-Bucau <rmannibucau@gmail.com>
wrote:

> Just call builder.addAdapter passing your custom date formatter and it will
> do what you asks. It replaces the default converter globally. No need of
> any model change.
>
> Le jeu. 14 mars 2019 à 21:04, Ivan Junckes Filho <ivanjunckes@gmail.com> a
> écrit :
>
> > Dani it could be.. but a simple way to change the date format would be
> > better.
> >
> > Romain, can you elaborate? I am not sure I understand.
> >
> > On Thu, Mar 14, 2019 at 1:24 PM Romain Manni-Bucau <
> rmannibucau@gmail.com>
> > wrote:
> >
> > > Hmm, normally set on the builder and not the annotation it works as you
> > > describes.
> > >
> > > Le jeu. 14 mars 2019 à 16:00, Ivan Junckes Filho <
> ivanjunckes@gmail.com>
> > a
> > > écrit :
> > >
> > > > I tried based on the blog but didn't work.
> > > >
> > > >
> > >
> >
> https://rmannibucau.wordpress.com/2015/07/09/javaee-apache-johnzon-json-library-javascript-date/
> > > >
> > > > See sample below:
> > > > https://github.com/ivanjunckes/convertertest
> > > >
> > > > But this doesn't also provide the same format for all "Date" fields,
> I
> > > need
> > > > to go field by field and add the converter.
> > > >
> > > > On Thu, Mar 14, 2019 at 11:41 AM Romain Manni-Bucau <
> > > rmannibucau@gmail.com
> > > > >
> > > > wrote:
> > > >
> > > > > Hi Ivan,
> > > > >
> > > > > We support it for jsonb and you can overriee default
> > > adapters/converters
> > > > in
> > > > > johnzon mapper already.
> > > > >
> > > > > Did you try that? Sounds to me we are already covered for both
> > mappers.
> > > > Am
> > > > > I missing something?
> > > > >
> > > > > Romain
> > > > >
> > > > > Le jeu. 14 mars 2019 à 14:36, Ivan Junckes Filho <
> > > ivanjunckes@gmail.com>
> > > > a
> > > > > écrit :
> > > > >
> > > > > > Hey guys,
> > > > > >
> > > > > > I am from Brazil and would be useful to be able to pass a
> property
> > in
> > > > the
> > > > > > date format from Brazil.
> > > > > >
> > > > > > Is it ok if I submit a PR changing the line below to check it
> > > > > > "johnzon.default-date-format" has a value then use it, if not
use
> > the
> > > > > > default yyyyMMddHHmmssZ.
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/apache/johnzon/blob/f28196b39ae3d0ff2ccdd8b1e9efe2a5801e1e7f/johnzon-mapper/src/main/java/org/apache/johnzon/mapper/MapperBuilder.java#L81
> > > > > >
> > > > > > What do you think?
> > > > > >
> > > > >
> > > >
> > >
> >
>

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