serialize method
Object?
serialize(
- Serializers serializers,
- T object, {
- FullType specifiedType = FullType.unspecified,
Implementation
Object? serialize(Serializers serializers, T object,
{FullType specifiedType = FullType.unspecified}) {
final Serializer<T> serializer = this.serializer;
if (serializer is PrimitiveSerializer<T>) {
return serializer.serialize(serializers, object, specifiedType: specifiedType);
} else if (serializer is StructuredSerializer<T>) {
return serializer.serialize(serializers, object, specifiedType: specifiedType);
} else {
return object;
}
}