asolfre / google-gson

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

Support configuration of serialization thru mix-in #451

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be very nice to be able to use annotation-based configuration without 
modifying the classes themselves. The only solution now is type converters, 
which are much less convenient.

http://wiki.fasterxml.com/JacksonMixInAnnotations

I think being able to use a mix-in for (de)serializing a whole type hierarchy 
would be a great addition and a big time-saver when dealing with "foreign" 
classes.

Original issue reported on code.google.com by floz...@gmail.com on 10 Jun 2012 at 10:31

GoogleCodeExporter commented 9 years ago
Seems like a lot of framework complexity. You could accomplish the same with 
relative ease by writing a custom type adapter that delegates.

Original comment by limpbizkit on 30 Jun 2012 at 3:08

GoogleCodeExporter commented 9 years ago
Of course you could write a whole custom type adapter, but that's way more code 
for the developer who uses the library.

Original comment by floz...@gmail.com on 30 Jun 2012 at 9:27