      media_type = 'application/vnd.oai.openapi+json'
      charset = None
      format = 'openapi-json'
  
      def render(self, data, media_type=None, renderer_context=None):
          return json.dumps(data, cls=self.encoder_class, indent=2).encode('utf-8')
 
</s> remove         return json.dumps(data, indent=2).encode('utf-8')
 </s> add         return json.dumps(data, cls=self.encoder_class, indent=2).encode('utf-8') </s> remove     BaseRenderer, BrowsableAPIRenderer, JSONRenderer, OpenAPIRenderer
 </s> add     BaseRenderer, BrowsableAPIRenderer, JSONOpenAPIRenderer, JSONRenderer,
    OpenAPIRenderer
    encoder_class = encoders.JSONEncoder
      media_type = 'application/vnd.oai.openapi+json'
      charset = None
    encoder_class = encoders.JSONEncoder
      format = 'openapi-json'
  
      def render(self, data, media_type=None, renderer_context=None):
          return json.dumps(data, cls=self.encoder_class, indent=2).encode('utf-8')
keep add keep keep keep keep
 Fix OpenAPISchema rendering for timedelta (#7641)

* Add failing test when rendering to json a schema with timedelta

* Fix JSONOpenAPIRenderer for fields with default=timedelta()

* fix isort

* fix test for python 3.5

Co-authored-by: Pierre Chiquet <pierre.chiquet@ubikey.fr> 
rest_framework/renderers.py