python ValueError: No JSON object could be decoded

premise

  1. utf-8 format without encoding the BOM
  2. When converted into ANSI code, not garbled blank area, as shown, with a blank area should be 制表符\treplaced
    Here Insert Picture Description

problem causes:

用`notepad++`打开json文件,并且使用`ANSI`编码后,出现如上面途中所示的乱码

Solution

use制表符\t替换乱码即可

Published 118 original articles · won praise 14 · views 50000 +

Guess you like

Origin blog.csdn.net/github_38641765/article/details/89924616