回答編集履歴
1
修正
answer
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
json_res = json.loads(decoded_res)
|
20
20
|
```
|
21
21
|
|
22
|
-
よくわからなければ一旦jsonを出力して眺めてください。(絵文字などはそのままjsonに含められないので、デコード
|
22
|
+
よくわからなければ一旦jsonを出力して眺めてください。(絵文字などはそのままjsonに含められないけどエスケープしてしまったら本末転倒なので、デコードのエラー処理で?に置き換えをしています)
|
23
23
|
```python
|
24
24
|
replaced_res = decoded_res.encode('utf-8', errors='replace').decode('utf-8')
|
25
25
|
with open('output.json', 'w', encoding='utf-8') as f:
|