rithyskun / google-gson

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

List of generic interfaces #519

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, i have a problem in Gson serialization.
When i try to serialize an object with a list of generic interfaces, the list 
is empty.

I have find a solution to create an adapter with registerTypeAdapter but i 
think that is just a bug in Gson lib.

In the code if you remove 
gsonBuilder.registerTypeAdapter(IPClass.class, new IPClassAdapter());
the list is not serialized.

The IPClassAdapter is just a SUPER.serialize via context.serialize.

Original issue reported on code.google.com by fouache2...@gmail.com on 6 Jun 2013 at 2:32

Attachments: