Possible Duplicate:
Format floats with standard json module
>>> import json
>>> foo={'bar': 0.2}
>>> json.dumps(foo, indent=4)
'{\n "bar": 0.20000000000000001\n}'
Is there a way to have less precision/digits in the outputted JSON?
Possible Duplicate:
Format floats with standard json module
>>> import json
>>> foo={'bar': 0.2}
>>> json.dumps(foo, indent=4)
'{\n "bar": 0.20000000000000001\n}'
Is there a way to have less precision/digits in the outputted JSON?