afterSerialize method
Implementation
@override
Object? afterSerialize(Object? object, FullType specifiedType) {
if (object is List && !typesToLeaveAsList.contains(specifiedType.root)) {
if (specifiedType.isUnspecified) {
return _toMapWithDiscriminator(object);
} else {
return _toMap(object, _needsEncodedKeys(specifiedType));
}
} else {
return object;
}
}