Closed GoogleCodeExporter closed 9 years ago
We didn't want to increase the footprint of our API by doing so. Also, we
didn't want to commit to the backward compatibility of these type adapters.
Any reason why you can't just copy over the source-code in your own type
adapter. When you register a type adapter, it overrides any Gson defaults.
Original comment by inder123
on 3 Nov 2010 at 12:04
I can't only because the builtin type adapters also reference package-only
visibility classes. As another example, I have a json response from a web
service that returns an array if empty, otherwise a map. I need to check for
the type before serializing and set the target field to null, otherwise it
throws an exception.
The builtin MapTypeAdapter, however, depends on package-local TypeInfoMap. I'm
worried that a rat's nest is in store for me if I try and move everything out.
Preferable would be to be able to decorate MapTypeAdapter and call it a day.
Original comment by aaron.st...@gmail.com
on 7 Dec 2010 at 7:49
Original issue reported on code.google.com by
aaron.st...@gmail.com
on 2 Nov 2010 at 6:28