Java Google Json (Gson) Serializing Collections

Serializing list

Serializing Collections should have been similar to serializing other objects. However, the problem is that Collections are generic and the generic type information is not maintained in the json. We therefore pass the type while deserializing list. Note that if the Collection has different types of objects then there is no way to serialize it.

The Dataset Class

Leave a Reply

Your email address will not be published. Required fields are marked *