users@jersey.java.net

jersey+jaxb+json 115 date encoding drops 0 millis

From: Tony Nys <tonynys_at_yahoo.com>
Date: Wed, 2 Jun 2010 01:55:20 -0700 (PDT)

Hi all,
We're using jersey/json (1.1.5) on the server and gwt on the client.
When jersey/jaxb encodes a java.util.date to a string, the milliseconds are dropped of if it the time had exactly 0 milliseconds.
This causes a datetimeformat parse error in gwt since mostly the millis are there ".000" but in extreme situations it can be without any or with eg. ".20" in stead of ".200".

We need a way to ALLWAYS have ".xxx" even if it is ".000"

Is there a Jaxb annotation (we don't map to xsds) to specify the default dateformat ? Because if there is we can even drop the millis totally since we are not needing them at client side.

Thanks

Tony