Python Forum
Json Objects in Python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Json Objects in Python (/thread-835.html)



Json Objects in Python - ramankoduri - Nov-08-2016

Hi,

I am getting values in Json format.  In those values data may contain in Latin or Japanese or Chinese.

How can I retrieve that data in those languages?  Please help me.

Thank you
Raman


RE: Json Objects in Python - Larz60+ - Nov-08-2016

Start by learning how to use JSON. It's pretty simple and won't take long
Get started here: https://docs.python.org/3/library/json.html

Do you know the utf encoding format?
chinese is probably utf-16, same with Japanese
Latin i would expect utf-8

if you need to translate, take a look at goslate: https://pypi.python.org/pypi/goslate


RE: Json Objects in Python - ramankoduri - Nov-09-2016

(Nov-08-2016, 01:06 PM)Larz60+ Wrote: Start by learning how to use JSON. It's pretty simple and won't take long Get started here: https://docs.python.org/3/library/json.html Do you know the utf encoding format? chinese is probably utf-16, same with Japanese Latin i would expect utf-8 if you need to translate, take a look at goslate: https://pypi.python.org/pypi/goslate

Hi,

When we are retrieving data from Json, below things we are getting. Not able to display with the Original Language in Japanese.

"name":"Raman \u897f\u5ca1","first_name":"Raman","last_name":"\u897f\u5ca1"


RE: Json Objects in Python - Larz60+ - Nov-09-2016

I am not an expert using languages other than English with JSON'
Here's a url that shows how to read the data

see: http://stackoverflow.com/questions/34761042/python-how-to-read-chinese-character-from-json-file

on how to actually read the data from Json.
then (if still in Japanese look at the goslate module: https://pypi.python.org/pypi/goslate