Serialize response.

        :return response: Instance of django.http.Response

def emit(self):
        """ Serialize response.

        :return response: Instance of django.http.Response

        """
        # Skip serialize
        if not isinstance(self.response, SerializedHttpResponse):
            return self.response

        self.response.content = self.serialize(self.response.response)
        self.response['Content-type'] = self.media_type
        return self.response