0
내가 매개 변수 ensure_ascii와 JSON 파일을 작성하려는
= 거짓 어떻게 든 항상 나에게= 거짓
이
인가 "는 JSON 직렬화하지 --is"일부 오류가 있습니다 secured_ascii = False로 JSON 파일을 작성하는 또 다른 방법은 없을까요?
** 파이썬 2.7
ret = twitter_stream.statuses.filter(track='สวัสดี')
tweet_count = 3 for tweet in ret:
tweet_count -= 1
# We convert it back to the JSON format to print/score
print ('----',tweet_count,'----')
#print json.dumps(tweet,ensure_ascii=False,indent=4)
if tweet_count <= 0:
break
with io.open('data1.json', 'w', encoding='utf-8') as outfile:
outfile.write(json.dumps(ret, ensure_ascii=False, indent=4))
print("Done")
json.dumps 전에'type (tweet)'하고 출력은 무엇입니까? – MohitC
출력은 –
patppd