The easiest way to convert between JSON and GWT objects is to use
overlay objects.  Unfortunately, there is no type checking by doing
this, but you get the best performance.  Now, if you need to support
older versions of IE you will need to include json2.js in your
project, but you can use the JSON.parse and JSON.stringify functions
to convert between javascript objects and a JSON string.

http://code.google.com/p/google-web-toolkit/wiki/OverlayTypes


On Jul 7, 10:41 am, Ahmed Shoeib <ahmedelsayed.sho...@gmail.com>
wrote:
> i need to convert JSON to/From Java Object
>
> how to do it ?
> i don't know how to use this way
>
> On Jul 6, 10:35 pm, eggsy84 <jimbob...@hotmail.com> wrote:
>
> > Hi all,
>
> > With the latest versions of GWT you don't have to use any other
> > libraries.
>
> > GWT now comes with something known as Javascript Overlays that you can
> > utilise to convert JSON into Objects.
>
> > See here:
>
> >http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsOver...
>
> > Also I have made a bit of a discussion on my blog here:
>
> >http://eggsylife.co.uk/2010/04/22/gwt-2-jsonp-and-javascript-overlays...
>
> > Hope this helps,
>
> > Eggsy
>
> > On Jul 6, 1:38 pm, Harald Pehl <harald.p...@googlemail.com> wrote:
>
> > > You cannot use gson in GWT. 
> > > Seehttp://groups.google.com/group/google-gson/browse_thread/thread/6c3d6...
> > > for more infos.
>
> > > If you need a JSON parser for GWT take a look at Piriti (http://
> > > code.google.com/p/piriti/).
>
> > > - Harald
>
> > > On 6 Jul., 12:30, Ahmed Shoeib <ahmedelsayed.sho...@gmail.com> wrote:
>
> > > > Welcome ,
>
> > > > i add gson lib version 1.4
>
> > > > and i face a problem when trying to inherit it in the gwt.xml file
>
> > > > how i can fix this problem ???
>
> > > > thanks ,
> > > > ahmed shoeib

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@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