jinja2.escape the json.dumps? i would probably do the json dump here at the last possible moment