Fix for TypeError in server.py (in Python 2.7?)

Hello Shuyo

I am running Ubuntu 12.10, and your version of server.py has a TypeError in the json encoder. I wonder if this is because of a change between Python2.7 and older versions. Anyhow, the fix in this pull request is quite trivial.

Cheers
Marco