summaryrefslogtreecommitdiff
path: root/src/main/kotlin/at/hannibal2/skyhanni/changelog/GsonUtils.kt
blob: 0520c212e2f47410fa5eb6c7b5b03364ab85c7d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package at.hannibal2.skyhanni.changelog

import com.google.gson.Gson
import com.google.gson.reflect.TypeToken

object GsonUtils {

    val gson = Gson()

    inline fun <reified T> readObject(json: String): T {
        return gson.fromJson(json, object : TypeToken<T>() {})
    }

}