          """
          Object instance -> Dict of primitive datatypes.
          """
          ret = OrderedDict()
          fields = [field for field in self.fields.values() if not field.write_only]
  
          for field in fields:
              try:
                  attribute = field.get_attribute(instance)
              except SkipField:
 
</s> remove         fields = [
            field for field in self.fields.values()
            if (not field.read_only) or (field.default is not empty)
        ]
 </s> add         fields = self._to_internal_value_fields
        fields = self._to_representation_fields
          """
          Object instance -> Dict of primitive datatypes.
          """
          ret = OrderedDict()
        fields = self._to_representation_fields
  
          for field in fields:
              try:
                  attribute = field.get_attribute(instance)
              except SkipField:
keep keep keep keep replace keep keep keep keep keep
 Cache fields list for to_internal_value and to_representation. 
rest_framework/serializers.py