Thanks guys, yes looks like JSON is the way to go. POJO->JSON should
be easy (using the JSON API), but the other way is a bit tricky. I
don't think overlays help because the JavaScript side never sees the
objects (just the string) and the JSON->POJO process shouldn't depend
on the specific class. As I understand overlays (http://goo.gl/fNzG),
you need to (1) have the object in JS and (2) know the attributes.

I'm experimenting with rolling my own, will post back results.

On Jul 15, 8:08 am, Paul Stockley <[email protected]> wrote:
> You could use JSON and javascript overlay types to access the
> information in a type safe way.
>
> On Jul 15, 10:55 am, Stefan Bachert <[email protected]> wrote:
>
>
>
> > Hi Sekhar,
>
> > this is my first thought. Just use JSON. Then you can use "eval" to
> > read it.
> > However, I do not know any method to export a object to json string.
> > But this should not be too complicated to do yourself, or lookout for
> > such a library
>
> > Stefan Bacherthttp://gwtworld.de
>
> > On 15 Jul., 01:34, Sekhar <[email protected]> wrote:
>
> > > Thanks, yeah - sawhttp://goo.gl/fTloafterIposted. So, I guess
> > > we'll need to implement something of our own, like a simple to/from
> > > JSON strings. Any other thoughts/suggestions?
>
> > > On Jul 14, 3:37 pm, Thomas Broyer <[email protected]> wrote:
>
> > > > On 14 juil, 21:41, Sekhar <[email protected]> wrote:
>
> > > > > Guys, I'm trying to use HTML5 Local Storage and am wondering how I can
> > > > > save the data from the server as a string. Since GWT-RPC already
> > > > > serializes/deserializes Java serializable objects, is there a way to
> > > > > access its serialization functions to marshal the data to/from the
> > > > > Local Storage strings?
>
> > > > You can gain access to the GWT-RPC serialization code (provided your
> > > > objects are used in a GWT-RPC somewhere, so the GWT compiler generates
> > > > the appropriate serialization/deserialization code), but it won't be
> > > > of any help in your case, as GWT-RPC serialization is asymmetric (for
> > > > performance reasons).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to