def json(self, json_doc, status=<NUM_LIT:200>, headers=None):
headers = headers or {}<EOL>if '<STR_LIT>' not in headers:<EOL><INDENT>headers['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL><DEDENT>return self.text(json.dumps(json_doc), status, headers)<EOL>
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