Export to GitHub

httplib2 - issue #297

httplib2 post data error in format json which include unicode


Posted on Oct 24, 2013 by Massive Wombat

What steps will reproduce the problem? 1. when i post data in format json,the data include unicode,eg: 'u\4e01' 2. request(url, 'POST', headers=self._headers, body=json.dumps(self._body,encoding='utf8',sort_keys=True)) 3.

What is the expected output? What do you see instead?

{"emailAddress": "", "firstName": "\u5b66\u660e", "govtID": "", "lastName":"\u4e01",

but,it should be like this "firstName": "\u5b66\u660e" "lastName":"\u4e01"

What version of the product are you using? On what operating system? httplib 0.8 win7 x86

Please provide any additional information below.

Status: New

Labels:
Type-Defect Priority-Medium