def render_to_json(templates, context, request):
html = render_to_string(<EOL>templates,<EOL>context=context,<EOL>request=request<EOL>)<EOL>_json = json.dumps({<EOL>"<STR_LIT:html>": html<EOL>})<EOL>return HttpResponse(_json)<EOL>
Generate a JSON HttpResponse with rendered template HTML.