##// END OF EJS Templates
templatefilters.json: call functions...
Gregory Szorc -
r23707:ae5447de default
parent child Browse files
Show More
@@ -208,6 +208,8 b' def json(obj):'
208 for i in obj:
208 for i in obj:
209 out.append(json(i))
209 out.append(json(i))
210 return '[' + ', '.join(out) + ']'
210 return '[' + ', '.join(out) + ']'
211 elif util.safehasattr(obj, '__call__'):
212 return json(obj())
211 else:
213 else:
212 raise TypeError('cannot encode type %s' % obj.__class__.__name__)
214 raise TypeError('cannot encode type %s' % obj.__class__.__name__)
213
215
General Comments 0
You need to be logged in to leave comments. Login now