code: def _single_resource_json_response(resource, depth=0):
      
      links = resource.links()
      response = jsonify(**resource.as_dict(depth))
      response.headers['Link'] = ''
      for link in links:
          response.headers['Link'] += '<{}>; rel="{}",'.format(
              link['uri'], link['rel'])
      response.headers['Link'] = response.headers['Link'][:-1]
      return response
docs: Return the JSON representation of *resource*.
  
      :param resource: :class:`sandman.model.Model` to render
      :type resource: :class:`sandman.model.Model`
      :rtype: :class:`flask.Response`