Closed lisboa closed 9 years ago
I will look at it next week, I won't have time this one, sorry :(
In the meantime, if your problem is to use a different implementation, you could use @JsonTypeInfo with Id.NAME
and with mixin register a different implementation to the name in client and server.
Or use a completely different root POJO between client and server.
Hi Nicolas, this is great. Thanks!
With 2 month late, I finally look at it.
as
, keyAs
and contentAs
are supported on fields and methods (not class or constructor parameters).
To use it, you have to add jackson-databind dependency in your GWT classpath (should already be the case if you are using the annotation).
Hello Nicolas, You can give a direction of how to include the annotation @JsonDeserialize(as=MyImpl.class) ?
@JsonTypeInfo has some limitations. One is the bi-directional link between interface and implementation. Besides, In some cases, the server and client should only share interfaces. For example, the server can be a heavy implementation of the interface while the client is a lightweight container for data.
Thanks, Fabio