'Returns JSONP-encoded string with content-type
``application/javascript`` if query parameter matching
``self.param_name`` is present in request.GET; otherwise returns
plain-JSON encoded string with content-type ``application/json``'

def __call__(self, info):

    def _render(value, system):
        request = system.get('request')
        default = self._make_default(request)
        val = self.serializer(value, default=default, **self.kw)
        ct = 'application/json'
        body = val
        if (request is not None):
            callback = request.GET.get(self.param_name)
            if (callback is not None):
                if (not JSONP_VALID_CALLBACK.match(callback)):
                    raise HTTPBadRequest('Invalid    JSONP    callback    function    name.')
                ct = 'application/javascript'
                body = '/**/{0}({1});'.format(callback, val)
            response = request.response
            if (response.content_type == response.default_content_type):
                response.content_type = ct
        return body
    return _render
