code: def json(self, json_doc, status=200, headers=None):
          '''
          Respond with given status and JSON content. Will also set ``'Content-Type'`` to
          ``'applicaion/json'`` if header is not specified explicitly
  
          :type json_doc: dict
          :param json_doc: dictionary to respond with converting to JSON string
  
          :type status: int
          :param status: status code to return
  
          :type headers: dict
          :param headers: dictionary of headers to add to response
          '''
          headers = headers or {}
          if 'content-type' not in headers:
              headers['content-type'] = 'application/json'
          return self.text(json.dumps(json_doc), status, headersf json(self, json_doc, status=200, headers=None):
          '''
          Respond with given status and JSON content. Will also set ``'Content-Type'`` to
          ``'applicaion/json'`` if header is not specified explicitly
  
          :type json_doc: dict
          :param json_doc: dictionary to respond with converting to JSON string
  
          :type status: int
          :param status: status code to return
  
          :type headers: dict
          :param headers: dictionary of headers to add to response
          '''
          headers = headers or {}
          if 'content-type' not in headers:
              headers['content-type'] = 'application/json'
          return self.text(json.dumps(json_doc), status, headers)
docs: Respond with given status and JSON content. Will also set ``'Content-Type'`` to
          ``'applicaion/json'`` if header is not specified explicitly
  
          :type json_doc: dict
          :param json_doc: dictionary to respond with converting to JSON string
  
          :type status: int
          :param status: status code to return
  
          :type headers: dict
          :param headers: dictionary of headers to add to response