fixed json_dumps encoding not allowed in binary mode bug