I am trying to json object from a string and it is converting into UNICODE. Means including u(‘XXXXX’,) format. Where XXXX is the value for a key of json array.
The json content returned from the server is of type UTF-8
I am using JSON.ObjectFromURL, Do I need specify any parameter to this function to get plain string instead of UNICODE. I tried encode to ascii, but it removes U and even replace function did not help in replacing the other characters. Some thing I am missing. I am not an python expert.
Please advice.
thanks
Ramesh
The documentation shows
JSON.ObjectFromURL(url, values=None, headers={}, cacheTime=None, encoding=None, errors=None, timeout=<object object at 0x10042bc40>, sleep=0)
so it looks like you can specify the encoding type.
UTF-8 is unicode though. What exactly is the problem?
It is my mistake. I have included a comma while assigning the json array to one of the variable. That is including (‘XXXX’,)
Great topic! I am working on an executive overview that I need to present to my manager, can anybody point me to some other high-level discussions on this topic, I’m not a great writer (except when it comes to code :)) and I would like to see how some people describe it in a way that’s easy for non-technical folks … Thanks