an intropsective serializer trait for complex objects