##// END OF EJS Templates
formatter: convert float value to json...
Yuya Nishihara -
r22476:a0829ec3 default
parent child Browse files
Show More
@@ -91,8 +91,8 class pickleformatter(baseformatter):
91 def _jsonifyobj(v):
91 def _jsonifyobj(v):
92 if isinstance(v, tuple):
92 if isinstance(v, tuple):
93 return '[' + ', '.join(_jsonifyobj(e) for e in v) + ']'
93 return '[' + ', '.join(_jsonifyobj(e) for e in v) + ']'
94 elif isinstance(v, int):
94 elif isinstance(v, (int, float)):
95 return '%d' % v
95 return str(v)
96 else:
96 else:
97 return '"%s"' % encoding.jsonescape(v)
97 return '"%s"' % encoding.jsonescape(v)
98
98
General Comments 0
You need to be logged in to leave comments. Login now