  
          if data is None:
              return ''
  
          return yaml.dump(data, stream=None, Dumper=self.encoder)
  
  
  class TemplateHTMLRenderer(BaseRenderer):
      """
      An HTML renderer for use with templates.
 
</s> remove         Render `obj` into json.
 </s> add         Render `data` into JSON. </s> remove         if not self.ensure_ascii:
 </s> add         # On python 2.x json.dumps() returns bytestrings if ensure_ascii=True,
        # but if ensure_ascii=False, the return type is underspecified,
        # and may (or may not) be unicode.
        # On python 3.x json.dumps() returns unicode strings.
        if isinstance(ret, six.text_type): </s> remove         self.assertEqual(content, _flat_repr)
 </s> add         self.assertEqual(content.decode('utf-8'), _flat_repr) </s> remove         xml = SimplerXMLGenerator(stream, "utf-8")
 </s> add         xml = SimplerXMLGenerator(stream, self.charset) </s> remove         return "%s(%s);" % (callback, json)
 </s> add         return callback.encode(self.charset) + b'(' + json + b');'
        return yaml.dump(data, stream=None, encoding=self.charset, Dumper=self.encoder)
  
          if data is None:
              return ''
  
        return yaml.dump(data, stream=None, encoding=self.charset, Dumper=self.encoder)
  
  
  class TemplateHTMLRenderer(BaseRenderer):
      """
      An HTML renderer for use with templates.
keep keep keep keep replace keep keep keep keep keep
 Last bits of charset sorting-out-ness 
rest_framework/renderers.py