Show More
@@ -221,7 +221,7 b' def indent(text, prefix):' | |||
|
221 | 221 | def json(obj): |
|
222 | 222 | if obj is None or obj is False or obj is True: |
|
223 | 223 | return {None: 'null', False: 'false', True: 'true'}[obj] |
|
224 |
elif isinstance(obj, int |
|
|
224 | elif isinstance(obj, (int, long, float)): | |
|
225 | 225 | return str(obj) |
|
226 | 226 | elif isinstance(obj, str): |
|
227 | 227 | return '"%s"' % encoding.jsonescape(obj, paranoid=True) |
General Comments 0
You need to be logged in to leave comments.
Login now