Fix support for Unicode in python 2, better support JSON and extend the doc.