Monday, January 26, 2015

JSON JsDate/Date encode/decode with restyGWT

Rookie question from a non-English speaker:

I'm using restyGWT.  Client side with a Pojo Model and Server side with the corresponding JPA Entity class.

For decode/encode between both:

public interface EmpleadoJsonCodec extends JsonEncoderDecoder<Empleado> {}

public EmpleadoJsonCodec empleadoListJsonCodec = GWT.create(EmpleadoJsonCodec.class);


public void onSuccess(Method method, JSONValue response) {

                Empleado empleado = empleadoListJsonCodec.decode(response);



Everything was working perfect (GETs, PUTs, etc.) until I tried to add a JsDate/Date field to the Model/Entity.

I don´t know how to use JsDate/Date. What should I put in the Model (or Entity) so the Json (JSONValue responde) decode works fine?




You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment