I'm trying to figure out how to use AutoBeanFactory to decode a JSONString, 
e.g.

AutoBean<IPayload> autoBean = AutoBeanCodex.decode(myAutoBeanFactory, 
IPayload.class, jsonValue.stringValue());
IPayload payload = autoBean.as();

What I'm not clear on is how to define myAutoBeanFactory?

I understand that's an interface passed 
to GWT.create(MyAutoBeanFactory.class), but what methods 
does MyAutoBeanFactory need?

My IPayload and its content is defined as:

public interface IPayload extends Serializable {
    IGWTMessage[] getMessages();
    void setMessages(IGWTMessage[] messages);
}

public interface IGWTMessage extends IGWTMessage {
    IUUIDReference getMessageId();
    void setMessageId(IUUIDReference id);
}

Then there are about a dozen derived interfaces that extend IGWTMessage and 
then each of those has its concrete implementation class.

How can I handle this with AutoBeanFactory/JSON?

Btw, this used to be just Serialized and marshaled that way but now I'm 
trying to use a different approach that requires JSON.  Also, if there was 
a way to just do a regular Java binary serialization that would be fine too 
as I could then turn that into a Base64 encoded string and send just that 
via JSON...then do the reverse on the server.  (But I haven't yet seen a 
way to do Java binary serialization in the GWT client.) 

Thanks,
-Dave







-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/5QAmrhzI7gsJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to