users@jersey.java.net

[Jersey] Re: how to rename XmlRootElement in JSON

From: Maxrunner <joao.rossa_at_gmail.com>
Date: Mon, 20 Jun 2011 12:11:11 -0700 (PDT)

Hey, thanks ;) gotta try that tomorrow.

regards,

On Mon, Jun 20, 2011 at 7:10 PM, Cowtowncoder [via Jersey] <
ml-node+6496816-1082298204-73314_at_n2.nabble.com> wrote:

> On Thu, Jun 16, 2011 at 10:28 AM, Maxrunner <[hidden email]<http://user/SendEmail.jtp?type=node&node=6496816&i=0>>
> wrote:
> > Hi all! im trying to convert my calendar properties to another format, by
>
> > default jackson seems to be converting to the timeinmillis value, but i
> want
> > it to conveted as "dd/MM/YYYY" for example, im trying to use the
> > @xmlJavaTypeAdapter annotation that jackson seems to support but im not
> > getting the right results, it still display the calendar im milliseconds
> i
>
> There is a much simpler way, try this:
>
> mapper.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS,
> true);
>
> in general, if you can avoid using JAXB annotations with Jackson,
> avoid them. :-)
>
> -+ Tatu +-
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://jersey.576304.n2.nabble.com/how-to-rename-XmlRootElement-in-JSON-tp6173292p6496816.html
> To unsubscribe from how to rename XmlRootElement in JSON, click here<http://jersey.576304.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6173292&code=am9hby5yb3NzYUBnbWFpbC5jb218NjE3MzI5MnwyMDYzODA1MDkw>.
>
>


--
View this message in context: http://jersey.576304.n2.nabble.com/how-to-rename-XmlRootElement-in-JSON-tp6173292p6497053.html
Sent from the Jersey mailing list archive at Nabble.com.