discomarathon / google-gson

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

Serialization of Object fields ignores their types #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If type of a class field is Object, then GSON serializes it as {} instead
of the JSON for the actual object. See discussion at: 

http://groups.google.com/group/google-gson/browse_thread/thread/9241110c81f306b8

Original issue reported on code.google.com by inder123 on 9 Oct 2008 at 5:11

GoogleCodeExporter commented 9 years ago
Fixed this issue in r263 by updating the serialization visitor to use the more
specific of either the declared type of field or the actual type of the field 
value.

Original comment by inder123 on 13 Oct 2008 at 9:13