Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how json dump Japanese
#1
help,please.

I am coding a spider-code to collect message on a Japanese website, storing data using json-module

however, default json dump the data with Unicode. cant see raw Japanese

I see one solution on the internet is
json.loads('このコーディネートのスタイリストについて',encoding='utf-8')
but, this keyword is not available in json dump!
json.dump('このコーディネートのスタイリストについて',fp,encoding='utf-8')
this code raise an error that cant decode the 'gbk'!

but i cant encode my data structure into Unicode.
how can I see raw Japanese in my json file?
Reply


Messages In This Thread
how json dump Japanese - by yunkai - Dec-22-2018, 05:23 PM
RE: how json dump Japanese - by buran - Dec-22-2018, 06:23 PM
RE: how json dump Japanese - by vishalhule - Mar-17-2020, 07:06 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  JSON Dump and JSON Load foxholenoob 8 1,085 Oct-12-2023, 07:21 AM
Last Post: foxholenoob
  UnicodeEncodeError - Dealing with Japanese Characters fioranosnake 2 2,446 Jul-07-2022, 08:43 PM
Last Post: fioranosnake
  Python html herf to json dump help paulfearn100 0 2,029 Mar-03-2020, 09:16 PM
Last Post: paulfearn100
  print python json dump onto multiple lines lhailey 2 19,828 Mar-02-2020, 12:47 PM
Last Post: vishalhule
  creating hex dump modifying program ensoniq 3 2,636 Oct-14-2019, 08:21 AM
Last Post: Larz60+
  Type error: dump() missing 1 required positional argument: fp jaycuff13 2 21,891 Jul-13-2019, 10:21 AM
Last Post: jaycuff13
  Using pickle.dump Friend 1 2,945 Feb-15-2019, 04:39 PM
Last Post: metulburr
  tf.gfile.FastGFile error unicode ( japanese characters ) majinbuu 2 3,083 May-13-2018, 02:11 PM
Last Post: majinbuu

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020