Sunday, March 31, 2013

Replacing classes during custom serialization

When doing custom serialization, is it possible to swap out one class
for another?

This would fix a _lot_ of problems using Objectify's Ref<?> and Key<?>
client-side, including, I think, being able to instantiate Refs and
Keys intelligently.

But I have an immediate problem I'm trying to fix - which is that
Ref<?> is a class hierarchy on the server side, but I'd really like to
simplify this to a single concrete Ref class client-side. So even
though the sever might return StdRef<?> or NullRef<?>, these should be
converted to a simplified, concrete Ref<?> on the client side.

Is this possible? It would be even better if I could somehow just
define one custom serializer that handles all Ref subclasses instead
of having to make separate custom serializers for each.

Thanks in advance,
Jeff

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment