google-api-java-client icon indicating copy to clipboard operation
google-api-java-client copied to clipboard

Parse collection interfaces as serializable collections on Android

Open crizzis opened this issue 9 years ago • 2 comments

By default, AndroidJsonParser parses fields of collection interfaces as non-serializable classes (e.g. com.google.api.client.util.ArrayMap for java.util.Map). Since standard java collections are by large serializable, it would be convenient to ensure serializability of the parsed object graph (it is not unreasonable to assume developers would take serializability of collections for granted).

This is especially painful on Android if one wants to use objects from a parsed HttpResponse as activity extras/fragment params.

(BTW I am currently using CustomizeJsonParser to work around this issue. However, it seems cumbersome for such a common use case)

crizzis avatar Aug 07 '15 18:08 crizzis

I guess this is really a feature request to add serialization support to ArrayMap and similar. Would that work for you?

ejona86 avatar Aug 07 '15 18:08 ejona86

I suppose it would.

crizzis avatar Aug 07 '15 18:08 crizzis