From b2db78f0218bce014f6fb2b47b831ba75fdf725b Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 15 Sep 2014 01:29:08 -0500 Subject: [PATCH] Use json.dumps for the string handling instead. --- templates/api.mako | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/api.mako b/templates/api.mako index 6ff191f..6866535 100644 --- a/templates/api.mako +++ b/templates/api.mako @@ -1,3 +1,6 @@ +<%! + from json import dumps +%>\ <%def name="do_indent(size)">
% for i in xrange(size): @@ -21,10 +24,8 @@ % endfor ${do_indent(indent)} ] - % elif isinstance(obj, type("").__bases__[0]): - "${obj | h}" % else: - ${obj | h} + ${dumps(obj) | h} % endif \