Use json.JSONEncoder() and actually friggin test startkey and endkey
Merge pull request #8 from flexd/master

Fixed wrong call not existing method from json module.