#NEWLINE# @ allow_cross_site_request #NEWLINE# @ non_atomic_requests #NEWLINE# def render_json( request , addon , stats ) : #NEWLINE# #INDENT# 'Render a stats series in JSON.' #NEWLINE# response = http . HttpResponse ( content_type = 'text/json' ) #NEWLINE# if isinstance ( stats , GeneratorType ) : #NEWLINE# #INDENT# stats = list ( response ) #NEWLINE# #UNINDENT# fudge_headers ( response , stats ) #NEWLINE# json . dump ( stats , response , cls = DecimalJSONEncoder ) #NEWLINE# return response