<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ema_hiro</author_name>
  <author_url>https://blog.hatena.ne.jp/ema_hiro/</author_url>
  <blog_title>emahiro/b.log</blog_title>
  <blog_url>https://ema-hiro.hatenablog.com/</blog_url>
  <categories>
    <anon>Go</anon>
  </categories>
  <description>httpレスポンスを構造体にmappingする際に以下のようなコードを書くケースは多々あると思います。 ※ error handlingは割愛 // responseの取得 resp, _ := http.Get(url) body := resp.Body defer body.Close() // []byteへの変換 b, _ := ioutil.ReadAll(body) var data *Data // Data structへのjsonのmapping if err := json.Unmarshal(b, data); err != nil{ panic(err) } しかしこ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fema-hiro.hatenablog.com%2Fentry%2F2018%2F01%2F05%2F014449&quot; title=&quot;json.Unmarshalではnilの参照型へのmappingはできない - emahiro/b.log&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-01-05 01:44:49</published>
  <title>json.Unmarshalではnilの参照型へのmappingはできない</title>
  <type>rich</type>
  <url>https://ema-hiro.hatenablog.com/entry/2018/01/05/014449</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
