Objective-C에서 JSON 문자열을 Python으로 보냈습니다. 그런 다음 문자열의 내용을 파이썬 목록으로 나누고 싶습니다.Python : 사전 목록으로 JSON 문자열 - 반복 할 때 오류 발생
import json
s = '[{"i":"imap.gmail.com","p":"[email protected]"},{"i":"imap.aol.com","p":"anoterPass"}]'
jdata = json.loads(s)
for key, value in jdata.iteritems():
print key, value
나는이 오류가 :
Exception Error: 'list' object has no attribute 'iterates'
이 있습니다
은 다음과 같은 것을 시도? 하지만 솔루션에 포함되어 있습니다. – Pyderman