Fixed the json serializer for gencollection