2020年2月7日金曜日

moshi で List や Map の Generics Type を指定する

いつも忘れるので val type = Types.newParameterizedType( Map::class.java, Hoge::class.java, Fuga::class.java ) val adapter: JsonAdapter<Map<Hoge, Fuga>> = moshi.adapter(type)

1 件のコメント:

  1. Easy "water hack" burns 2 lbs OVERNIGHT

    Over 160 thousand women and men are losing weight with a easy and SECRET "liquids hack" to lose 2 lbs each night as they sleep.

    It's simple and works every time.

    This is how you can do it yourself:

    1) Take a drinking glass and fill it with water half the way

    2) Now use this proven HACK

    and you'll become 2 lbs skinnier in the morning!

    返信削除