discomarathon / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

GWT client-side support #208

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Requested feature enhancement. I realize introspection is unavailable in a 
GWT client-side environment. But it'd be so great and simple to use if you 
could use some sort of GWT.create() version.

Original issue reported on code.google.com by christop...@gmail.com on 10 May 2010 at 12:21

GoogleCodeExporter commented 9 years ago
Is it currently possible to, at least, use the GSON annotations 
(@SerializedName, @Expose, @Since...) in objects that can be sent over the wire 
in a GWT RPC call?   

Original comment by pohl.lon...@gmail.com on 29 Jun 2010 at 5:29

GoogleCodeExporter commented 9 years ago

Original comment by limpbizkit on 6 Oct 2010 at 5:52

GoogleCodeExporter commented 9 years ago

Original comment by limpbizkit on 18 Mar 2012 at 8:17

GoogleCodeExporter commented 9 years ago

Original comment by limpbizkit on 2 Sep 2012 at 9:47

GoogleCodeExporter commented 9 years ago
> But it'd be so great and simple to use if you 
> could use some sort of GWT.create() version.

That would be very tough. IMHO writing a GWT generator that does a compatible 
serialization should be possible but deserialization without knowing all 
possible classes to receive would almost be impossible. I have the same need 
and am looking for such solution. However, I think this would need to be 
provided by GWT itself as it needs deeper integration. It should also not be in 
the way for code-splitting.
Watch m-m-m.sf.net (mmm-service) if you want to see if I am lucky finding the 
right solution.

> Is it currently possible to, at least, use the GSON annotations 
> (@SerializedName, @Expose, @Since...) in objects that can be sent 
> over the wire in a GWT RPC call?  

That is fairly easy. All you need to do for that is writing a *.gwt.xml for 
gson.
I could provide this.

Unfortunately it seems that the makes of gson do not care about GWT :(

Original comment by joerg.ho...@googlemail.com on 20 Feb 2013 at 8:48

GoogleCodeExporter commented 9 years ago
I have write a library that allows using GWT with Gson, you can download here 
and enjoy it: https://github.com/heroandtn3/bGwtGson

Original comment by heroand...@gmail.com on 10 May 2013 at 11:37