<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kuxumarin</author_name>
  <author_url>https://blog.hatena.ne.jp/kuxumarin/</author_url>
  <blog_title>くうと徒然なるままに</blog_title>
  <blog_url>https://kuxumarin.hatenablog.com/</blog_url>
  <categories>
    <anon>Android</anon>
    <anon>Kotlin</anon>
  </categories>
  <description>ソリューションはあるけど、拡張関数でシュッと解決してくれるものがググっても出てこなかったので書きました。 ソースコード inline fun &lt;reified T&gt; Gson.fromJson( json: String ): T { return this.fromJson( json, object : TypeToken&lt;T&gt;() {}.type ) } 一番シュッと呼ぶとき これがほんと好きなんですが、既存の関数と同じインターフェイスでシュッと呼べるようになってます。 このケースでは返り値の型が指定してある場合は型を推定してくれるので型引数を指定する必要すらないです。 fun hoge…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkuxumarin.hatenablog.com%2Fentry%2F2019%2F11%2F06%2F043825&quot; title=&quot;Gson で List&amp;lt;*&amp;gt; なクラスをJsonからパースするときにシュッと処理してくれる拡張関数を書いた。 - くうと徒然なるままに&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>2019-11-06 04:38:25</published>
  <title>Gson で List&lt;*&gt; なクラスをJsonからパースするときにシュッと処理してくれる拡張関数を書いた。</title>
  <type>rich</type>
  <url>https://kuxumarin.hatenablog.com/entry/2019/11/06/043825</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
