I am using the standard json module in python 2.6 to serialize a list of floats. However, I'm getting results like this: >>> import json >>> json.dumps([23.67, 23.97, 23.87]) '[23.670000000000002, 23.969999999999999, 23.870000000000001]' I want the floats to be formated with only two decimal digits. The output should look like this: >>> json.dumps([23.67, 23.97, 23.87]) '[23.67, 23.97, 23.87]' I h
![Format floats with standard json module](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)