{"action":"created","issue":{"url":"https://api.github.com/repos/training-nlp-noob/knock100/issues/6","labels_url":"https://api.github.com/repos/training-nlp-noob/knock100/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/training-nlp-noob/knock100/issues/6/comments","events_url":"https://api.github.com/repos/training-nlp-noob/knock100/issues/6/events","html_url":"https://github.com/training-nlp-noob/knock100/issues/6","id":69251866,"number":6,"title":"Q20-29気づいたこととかコメントとかヘルプミートか","user":{"login":"kunisawa-fc","id":11006265,"avatar_url":"https://avatars.githubusercontent.com/u/11006265?v=3","gravatar_id":"","url":"https://api.github.com/users/kunisawa-fc","html_url":"https://github.com/kunisawa-fc","followers_url":"https://api.github.com/users/kunisawa-fc/followers","following_url":"https://api.github.com/users/kunisawa-fc/following{/other_user}","gists_url":"https://api.github.com/users/kunisawa-fc/gists{/gist_id}","starred_url":"https://api.github.com/users/kunisawa-fc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kunisawa-fc/subscriptions","organizations_url":"https://api.github.com/users/kunisawa-fc/orgs","repos_url":"https://api.github.com/users/kunisawa-fc/repos","events_url":"https://api.github.com/users/kunisawa-fc/events{/privacy}","received_events_url":"https://api.github.com/users/kunisawa-fc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2015-04-18T01:26:58Z","updated_at":"2015-04-29T03:36:38Z","closed_at":null,"body":""},"comment":{"url":"https://api.github.com/repos/training-nlp-noob/knock100/issues/comments/97295305","html_url":"https://github.com/training-nlp-noob/knock100/issues/6#issuecomment-97295305","issue_url":"https://api.github.com/repos/training-nlp-noob/knock100/issues/6","id":97295305,"user":{"login":"notani","id":1850199,"avatar_url":"https://avatars.githubusercontent.com/u/1850199?v=3","gravatar_id":"","url":"https://api.github.com/users/notani","html_url":"https://github.com/notani","followers_url":"https://api.github.com/users/notani/followers","following_url":"https://api.github.com/users/notani/following{/other_user}","gists_url":"https://api.github.com/users/notani/gists{/gist_id}","starred_url":"https://api.github.com/users/notani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notani/subscriptions","organizations_url":"https://api.github.com/users/notani/orgs","repos_url":"https://api.github.com/users/notani/repos","events_url":"https://api.github.com/users/notani/events{/privacy}","received_events_url":"https://api.github.com/users/notani/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T03:36:38Z","updated_at":"2015-04-29T03:36:38Z","body":"今更かもしれませんが、5日前に\r\n> json.loadができない理由がよくわからない。\r\n\r\nとのことだったので回答します。\r\n\r\nまず`json.load()`は「ファイルを指すオブジェクト」を読み込み、`json.loads()`は「テキスト(string)」を読み込むという違いがあります。ですので、`line`に一行分のテキストが入っているとき、`json.loads(line)`はOKですが、`json.load(line)`はできません。\r\n\r\n次に、`with gzip.open(...) as wiki:`としたときに、`json.load(wiki)`ができない問題ですが、これはダウンロードした`json.gz`のフォーマットが異常なためです。普通、複数のデータを含むjsonファイルはカンマ`,`区切りなのですが、今回のデータは改行`\\n`区切りです。また、すべてのデータを`[`,`]`で囲む必要がありますが、それも抜けていま。"}}