{"published":"2012-10-27 16:42:34","categories":["Go"],"height":"190","author_url":"https://blog.hatena.ne.jp/ymotongpoo/","type":"rich","width":"100%","blog_title":"YAMAGUCHI::weblog","provider_name":"Hatena Blog","url":"https://ymotongpoo.hatenablog.com/entry/2012/10/27/164234","title":" JSON\u3092Unmarshal\u3057\u3066\"json: cannot unmarshal null into Go value of type ....\"\u3068\u306a\u308b","provider_url":"https://hatena.blog","author_name":"ymotongpoo","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fymotongpoo.hatenablog.com%2Fentry%2F2012%2F10%2F27%2F164234\" title=\" JSON\u3092Unmarshal\u3057\u3066&quot;json: cannot unmarshal null into Go value of type ....&quot;\u3068\u306a\u308b - YAMAGUCHI::weblog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://ymotongpoo.hatenablog.com/","version":"1.0","description":"\u306f\u3058\u3081\u306b \u3053\u3093\u306b\u3061\u306f\u3001Go\u754c\u306e\u4e09\u8239\u654f\u90ce\u3067\u3059\u3002\u3044\u307ePython\u6e29\u6cc9\u3067Go\u3092\u3044\u3058\u3063\u3066\u308b\u3093\u3067\u3059\u304c\u3001null\u304c\u5165\u3063\u3066\u308bJSON\u3092Unmarshal\u3057\u305f\u3089\u306f\u307e\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002 \u30a8\u30e9\u30fc\u304c\u8d77\u304d\u305f\u30b3\u30fc\u30c9 ... type Hoge struct { Foo string Bar string } ... func Piyo() { ... var h Hoge err := json.Unmarshal(b, h) ... } \u3053\u308c\u3067\u3053\u3046\u3044\u3046JSON\u304c\u8fd4\u3063\u3066\u304f\u308b\u3068\"json: cannot unmarshal null into Go value of type string\"\u3068\u306a\u308b\u3002 {\"foo\": null\u2026"}