                      "You may want to consider using format='json' in this "
                      "test case." % key
                  )
          return encode_multipart(self.BOUNDARY, data)
 
</s>
class CoreJSONRenderer(BaseRenderer):
    media_type = 'application/vnd.coreapi+json'
    charset = None
    format = 'corejson'

    def __init__(self):
        assert coreapi, 'Using CoreJSONRenderer, but `coreapi` is not installed.'

    def render(self, data, media_type=None, renderer_context=None):
        indent = bool(renderer_context.get('indent', 0))
        codec = coreapi.codecs.CoreJSONCodec()
        return codec.dump(data, indent=indent)
                      "You may want to consider using format='json' in this "
                      "test case." % key
                  )
          return encode_multipart(self.BOUNDARY, data)
class CoreJSONRenderer(BaseRenderer):
    media_type = 'application/vnd.coreapi+json'
    charset = None
    format = 'corejson'

    def __init__(self):
        assert coreapi, 'Using CoreJSONRenderer, but `coreapi` is not installed.'

    def render(self, data, media_type=None, renderer_context=None):
        indent = bool(renderer_context.get('indent', 0))
        codec = coreapi.codecs.CoreJSONCodec()
        return codec.dump(data, indent=indent)
keep keep keep add
 Schemas & client libraries. (#4179)

* Added schema generation support.
* New tutorial section.
* API guide on schema generation.
* Topic guide on API clients.
rest_framework/renderers.py